RFC v2: https://lore.kernel.org/linux-mm/20221106140355.294845-1-42.hyeyoo@xxxxxxxxx/ This patch series moves PG_slab page flag to page_type, freeing one bit in page->flags and introduces %pGt format that prints human-readable page_type like %pGp for printing page flags. See changelog of patch 2 for more implementation details. Thanks everyone that gave valuable comments. v2 -> v3: - dropped show_page_types() in a thought that it is not interesting to track refcount of non-usermapped pages. - added patch 1 that cleans up MF_MSG_SLAB in hwpoison - split implementation and application of %pGt to separate patches. - instead of printing "no page_type for ..." in %pGt, just print '0x<value>()' for a page that does not use page_type field. Hyeonggon Yoo (4): mm/hwpoison: remove MF_MSG_SLAB from action_page_types mm: move PG_slab flag to page_type mm, printk: introduce new format %pGt for page_type mm/debug: use %pGt to print page_type in dump_page() 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 | 8 ++- kernel/crash_core.c | 3 +- lib/test_printf.c | 26 ++++++++ lib/vsprintf.c | 21 +++++++ mm/debug.c | 7 +++ mm/internal.h | 1 + mm/memory-failure.c | 10 --- mm/slab.c | 44 ++++++++----- mm/slab.h | 3 +- 13 files changed, 162 insertions(+), 65 deletions(-) -- 2.32.0