LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Muchun Song <songmuchun@bytedance.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Oscar Salvador <osalvador@suse.de>,
Michal Hocko <mhocko@suse.com>,
"Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com>,
David Hildenbrand <david@redhat.com>,
Chen Huang <chenhuang5@huawei.com>,
"Bodeddula, Balasubramaniam" <bodeddub@amazon.com>,
Jonathan Corbet <corbet@lwn.net>,
Xiongchun duan <duanxiongchun@bytedance.com>,
fam.zheng@bytedance.com, linux-doc@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Qi Zheng <zhengqi.arch@bytedance.com>
Subject: Re: [PATCH 2/5] mm: introduce save_page_flags to cooperate with show_page_flags
Date: Tue, 27 Jul 2021 15:06:28 +0800 [thread overview]
Message-ID: <CAMZfGtUaSsfjf4HSCsHMHFNxVaGrTXjVqE5iExM8JkMJPx169g@mail.gmail.com> (raw)
In-Reply-To: <fea1d845-209a-e2d5-6fcc-dbf17c949861@oracle.com>
On Tue, Jul 27, 2021 at 7:18 AM Mike Kravetz <mike.kravetz@oracle.com> wrote:
>
> On 7/14/21 2:17 AM, Muchun Song wrote:
> > Introduce save_page_flags to return the page flags which can cooperate
> > with show_page_flags. If we want to hihe some page flags from users, it
> > will be useful to alter save_page_flags directly. This is a preparation
> > for the next patch to hide some page flags from users.
> >
> > Signed-off-by: Muchun Song <songmuchun@bytedance.com>
> > ---
> > include/trace/events/mmflags.h | 3 +++
> > include/trace/events/page_ref.h | 8 ++++----
> > 2 files changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmflags.h
> > index 390270e00a1d..69cb84b1257e 100644
> > --- a/include/trace/events/mmflags.h
> > +++ b/include/trace/events/mmflags.h
> > @@ -121,6 +121,9 @@ IF_HAVE_PG_IDLE(PG_idle, "idle" ) \
> > IF_HAVE_PG_ARCH_2(PG_arch_2, "arch_2" ) \
> > IF_HAVE_PG_SKIP_KASAN_POISON(PG_skip_kasan_poison, "skip_kasan_poison")
> >
> > +#define save_page_flags(page) \
> > + (((page)->flags & ~PAGEFLAGS_MASK))
> > +
>
> Looking ahead to the next patch, this is changed to hide the PG_head
> flag for 'fake' head pages.
>
> IIRC, all vmemmap pages except the first will be mapped read only. So,
> all vmemmap pages with 'fake' head pages will be read only.
>
> It seems that all the modified trace events below are associated with
> updates to page structs. Therefore, it seems these events will never
> experience a 'fake' head page. Am I missing something?
Totally right. I didn't realize this point before. We cannot see a fake page
struct in page refcount tracing. So this patch is definitely pointless. I'll
drop it in the next version. Thanks Mike.
>
> --
> Mike Kravetz
next prev parent reply other threads:[~2021-07-27 7:07 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 9:17 [PATCH 0/5] Free the 2nd vmemmap page associated with each HugeTLB page Muchun Song
2021-07-14 9:17 ` [PATCH 1/5] mm: introduce PAGEFLAGS_MASK to replace ((1UL << NR_PAGEFLAGS) - 1) Muchun Song
2021-07-26 21:04 ` Mike Kravetz
2021-07-27 6:27 ` Muchun Song
2021-07-29 6:00 ` Muchun Song
2021-07-14 9:17 ` [PATCH 2/5] mm: introduce save_page_flags to cooperate with show_page_flags Muchun Song
2021-07-26 23:18 ` Mike Kravetz
2021-07-27 7:06 ` Muchun Song [this message]
2021-07-14 9:17 ` [PATCH 3/5] mm: hugetlb: free the 2nd vmemmap page associated with each HugeTLB page Muchun Song
2021-07-26 21:16 ` Matthew Wilcox
2021-07-26 23:56 ` Mike Kravetz
2021-07-27 7:15 ` Muchun Song
2021-07-14 9:17 ` [PATCH 4/5] mm: hugetlb: replace hugetlb_free_vmemmap_enabled with a static_key Muchun Song
2021-07-14 9:18 ` [PATCH 5/5] mm: sparsemem: use page table lock to protect kernel pmd operations Muchun Song
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMZfGtUaSsfjf4HSCsHMHFNxVaGrTXjVqE5iExM8JkMJPx169g@mail.gmail.com \
--to=songmuchun@bytedance.com \
--cc=akpm@linux-foundation.org \
--cc=bodeddub@amazon.com \
--cc=chenhuang5@huawei.com \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=duanxiongchun@bytedance.com \
--cc=fam.zheng@bytedance.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=mike.kravetz@oracle.com \
--cc=osalvador@suse.de \
--cc=song.bao.hua@hisilicon.com \
--cc=zhengqi.arch@bytedance.com \
--subject='Re: [PATCH 2/5] mm: introduce save_page_flags to cooperate with show_page_flags' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).