mbox series

[0/4] Increase the number of bits available in page_type

Message ID 20240821173914.2270383-1-willy@infradead.org (mailing list archive)
Headers show
Series Increase the number of bits available in page_type | expand

Message

Matthew Wilcox Aug. 21, 2024, 5:39 p.m. UTC
Kent wants more than 16 bits in page_type, so I resurrected this old patch
and expanded it a bit.  It's a bit more efficient than our current scheme
(1 4-byte insn vs 3 insns of 13 bytes total) to test a single page type.
Survives a simple smoke test, but I haven't done any specific testing
of these changes.

Matthew Wilcox (Oracle) (4):
  printf: Remove %pGt support
  mm: Introduce page_mapcount_is_type()
  mm: Support only one page_type per page
  zsmalloc: Use all available 24 bits of page_type

 Documentation/core-api/printk-formats.rst |  4 +-
 drivers/block/zram/Kconfig                |  1 -
 fs/proc/internal.h                        |  3 +-
 include/linux/mm.h                        |  3 +-
 include/linux/page-flags.h                | 76 +++++++++++------------
 include/trace/events/mmflags.h            | 10 ---
 kernel/vmcore_info.c                      |  8 +--
 lib/test_printf.c                         | 26 --------
 lib/vsprintf.c                            | 21 -------
 mm/Kconfig                                | 10 +--
 mm/debug.c                                | 31 ++++++---
 mm/internal.h                             |  1 -
 mm/zsmalloc.c                             | 15 ++---
 13 files changed, 72 insertions(+), 137 deletions(-)

Comments

Kent Overstreet Aug. 21, 2024, 9:15 p.m. UTC | #1
On Wed, Aug 21, 2024 at 06:39:08PM GMT, Matthew Wilcox (Oracle) wrote:
> Kent wants more than 16 bits in page_type, so I resurrected this old patch
> and expanded it a bit.  It's a bit more efficient than our current scheme
> (1 4-byte insn vs 3 insns of 13 bytes total) to test a single page type.
> Survives a simple smoke test, but I haven't done any specific testing
> of these changes.

not page_type itself, but - if we can get 24 bits for that field in
struct slab, we can add the object size there and make __ksize() faster,
which we can use to get actual numbers on amount of memory stranded by
RCU (and faster __ksize() will no doubt be useful in other places...)