From: Hyeonggon Yoo <42.hyeyoo@gmail.com>
To: linux-mm@kvack.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Vlastimil Babka <vbabka@suse.cz>,
Naoya Horiguchi <naoya.horiguchi@nec.com>,
Miaohe Lin <linmiaohe@huawei.com>,
Matthew Wilcox <willy@infradead.org>,
Minchan Kim <minchan@kernel.org>,
Mel Gorman <mgorman@techsingularity.net>,
Andrea Arcangeli <aarcange@redhat.com>,
Dan Williams <dan.j.williams@intel.com>,
Hugh Dickins <hughd@google.com>,
Muchun Song <songmuchun@bytedance.com>,
David Hildenbrand <david@redhat.com>,
Hyeonggon Yoo <42.hyeyoo@gmail.com>
Subject: [RFC v2 0/3] move PG_slab to page_type
Date: Sun, 6 Nov 2022 23:03:52 +0900 [thread overview]
Message-ID: <20221106140355.294845-1-42.hyeyoo@gmail.com> (raw)
RFC v1: https://lore.kernel.org/all/Y0BpuxUb+Y8BKHIM@casper.infradead.org/T/
This series moves PG_slab from page->flags to page->page_type.
as page_type field is also used number of active objects in slab,
upper half (16 bits) are used as page type and lower half (16 bits) are
used as slab->active.
It simplifies checking page_mapped() and folio_mapped() and
frees a bit in page->flags.
This also adds new %pGt printf format that prints human-readable
page_type, and show_page_flags() (for tracepoints).
More tests are still needed, but I think it's worth to get some early
feedbacks.
TO HWPOISON DEVELOPERS:
I think it would be best to add a code that identifies a type of
page from page_type like page flags. but I'm not sure how to
properly test it.
v1 -> v2:
- use page flag policy for pages that uses page_type
(PF_NO_TAIL for slab and PF_ANY for others) (Matthew WilCox)
- store slab->active in negative form and use helpers to
access/modify it (Matthew WilCox)
- Fix logical errors and some cleanup in fs/proc/page.c and kernel/crash_core.c
- add show_page_flags() (patch 2) and %pGt format (patch 3)
Any feedbacks are appreciated.
Hyeonggon Yoo (3):
mm: move PG_slab flag to page_type
mm: introduce show_page_types() to provide human-readable page_type
mm, printk: introduce new format %pGt for page_type
Documentation/core-api/printk-formats.rst | 3 +-
fs/proc/page.c | 13 ++--
include/linux/mm_types.h | 11 ++--
include/linux/page-flags.h | 77 ++++++++++++++++-------
include/trace/events/mmflags.h | 13 +++-
include/trace/events/page_ref.h | 10 ++-
kernel/crash_core.c | 3 +-
lib/test_printf.c | 23 +++++++
lib/vsprintf.c | 24 +++++++
mm/debug.c | 7 +++
mm/internal.h | 1 +
mm/memory-failure.c | 8 ---
mm/slab.c | 44 ++++++++-----
mm/slab.h | 3 +-
14 files changed, 175 insertions(+), 65 deletions(-)
--
2.32.0
next reply other threads:[~2022-11-06 14:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-06 14:03 Hyeonggon Yoo [this message]
2022-11-06 14:03 ` [RFC v2 1/3] mm: move PG_slab flag to page_type Hyeonggon Yoo
2022-11-08 5:39 ` HORIGUCHI NAOYA(堀口 直也)
2022-11-09 5:45 ` Hyeonggon Yoo
2022-11-06 14:03 ` [RFC v2 2/3] mm: introduce show_page_types() to provide human-readable page_type Hyeonggon Yoo
2022-11-06 18:23 ` Steven Rostedt
2022-11-09 6:19 ` Hyeonggon Yoo
2022-11-06 14:03 ` [RFC v2 3/3] mm, printk: introduce new format %pGt for page_type Hyeonggon Yoo
2022-11-06 18:04 ` Joe Perches
2022-11-09 6:14 ` Hyeonggon Yoo
2022-11-09 8:13 ` Petr Mladek
2022-11-07 11:18 ` Andy Shevchenko
2022-11-07 14:20 ` Petr Mladek
2022-11-07 14:41 ` Andy Shevchenko
2022-11-09 6:04 ` Hyeonggon Yoo
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=20221106140355.294845-1-42.hyeyoo@gmail.com \
--to=42.hyeyoo@gmail.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=dan.j.williams@intel.com \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=linmiaohe@huawei.com \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=minchan@kernel.org \
--cc=naoya.horiguchi@nec.com \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=songmuchun@bytedance.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).