Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/11] nodemask: switch to runtime nr_node_ids
@ 2026-11-27 23:01 Yury Norov
  2026-11-27 23:01 ` [PATCH 01/11] nodemask: add 'small' and 'large' compile-time sizes Yury Norov
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Yury Norov @ 2026-11-27 23:01 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton, linux-mm, Rasmus Villemoes,
	David Hildenbrand, Gregory Price, Zi Yan, Joshua Hahn, Rakie Kim,
	Ying Huang, Muchun Song, Oscar Salvador, Johannes Weiner,
	Kairui Song, Thomas Bogendoerfer, Rafael J. Wysocki, Len Brown,
	Jens Axboe, Peter Zijlstra, Mel Gorman, Steven Rostedt,
	Masami Hiramatsu, Mathieu Desnoyers, linux-mips, linux-acpi,
	linux-block, linux-trace-kernel
  Cc: Yury Norov, Liam R. Howlett, Axel Rasmussen, Baolin Wang,
	Baoquan He, Barry Song, Linus Torvalds, Lorenzo Stoakes,
	Michal Hocko, Mike Rapoport, Qi Zheng, Shakeel Butt,
	Suren Baghdasaryan, Vlastimil Babka, Wei Xu, Yuanchu Xie,
	Yury Norov

Nodemasks have a compile-time capacity of MAX_NUMNODES, and
nr_node_ids describes the runtime node ID usage.

Modern distros, like my Ubuntu, default MAX_NUMNODES to 1024, while the
actual number of nodes is typically smaller. All nodemask functions
currently refer to the MAX_NUMNODES, which adds a substantial overhead
on every traversing operation.

This series switches the kernel to runtime length of nodemasks, which
also saves up to 8K of .text for minimal config, and accelerates basic
nodemask operations ~4x if MAX_NUMNODES == 1024 and nr_node_ids == 2.

Yury Norov (11):
  nodemask: add 'small' and 'large' compile-time sizes
  nodemask: pass nodemask length to node search functions
  mm/mempolicy: reject migrate_pages source IDs beyond nr_node_ids
  mm/mempolicy: preserve full-width userspace nodemasks
  mm: switch to runtime nodemask length
  MIPS: IP27: switch nmi_dump to runtime nodemask length
  ACPI: NUMA: switch acpi_map_pxm_to_node to runtime nodemask length
  mtip32xx: switch next_online_node() to runtime nodemask length
  nodemask: add nodes_copy_and_extend()
  sched/numa: bound cpuset trace masks by nr_node_ids
  nodemask: add cpumask-style operation size bounds

 arch/mips/sgi-ip27/ip27-nmi.c     |   2 +-
 drivers/acpi/numa/srat.c          |   2 +-
 drivers/block/mtip32xx/mtip32xx.c |   2 +-
 include/linux/nodemask.h          | 122 +++++++++++++++++++-----------
 include/trace/events/sched.h      |   7 +-
 mm/hugetlb_internal.h             |   2 +-
 mm/mempolicy.c                    |  55 +++++++++-----
 mm/mmzone.c                       |   2 +-
 mm/vmscan.c                       |   2 +-
 9 files changed, 123 insertions(+), 73 deletions(-)

-- 
2.53.0



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-11-27 23:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-27 23:01 [PATCH 00/11] nodemask: switch to runtime nr_node_ids Yury Norov
2026-11-27 23:01 ` [PATCH 01/11] nodemask: add 'small' and 'large' compile-time sizes Yury Norov
2026-11-27 23:01 ` [PATCH 02/11] nodemask: pass nodemask length to node search functions Yury Norov
2026-11-27 23:01 ` [PATCH 03/11] mm/mempolicy: reject migrate_pages source IDs beyond nr_node_ids Yury Norov
2026-11-27 23:01 ` [PATCH 04/11] mm/mempolicy: preserve full-width userspace nodemasks Yury Norov
2026-11-27 23:01 ` [PATCH 05/11] mm: switch to runtime nodemask length Yury Norov
2026-11-27 23:01 ` [PATCH 06/11] MIPS: IP27: switch nmi_dump " Yury Norov
2026-11-27 23:01 ` [PATCH 07/11] ACPI: NUMA: switch acpi_map_pxm_to_node " Yury Norov
2026-11-27 23:01 ` [PATCH 08/11] mtip32xx: switch next_online_node() " Yury Norov
2026-11-27 23:01 ` [PATCH 09/11] nodemask: add nodes_copy_and_extend() Yury Norov
2026-11-27 23:01 ` [PATCH 10/11] sched/numa: bound cpuset trace masks by nr_node_ids Yury Norov
2026-11-27 23:01 ` [PATCH 11/11] nodemask: add cpumask-style operation size bounds Yury Norov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox