Skip to content

RFC Modify zonelist to nodelist v1

Pengfei Li linux-mm lkml oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest19 patches 21 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/19mm, mmzone: modify zonelist to nodelistdrivers/tty/sysrq.c include/linux/gfp.h include/linux/mmzone.h +15 more+367 -3190 replies
2/19mm, hugetlb: use for_each_node in dequeue_huge_page_nodemask()mm/hugetlb.c+4 -110 replies
3/19mm, oom_kill: use for_each_node in constrained_alloc()mm/oom_kill.c+6 -40 replies
4/19mm, slub: use for_each_node in get_any_partial()mm/slub.c+5 -50 replies
5/19mm, slab: use for_each_node in fallback_alloc()mm/slab.c+4 -70 replies
6/19mm, vmscan: use for_each_node in do_try_to_free_pages()mm/vmscan.c+7 -100 replies
7/19mm, vmscan: use first_node in throttle_direct_reclaim()mm/vmscan.c+19 -220 replies
8/19mm, vmscan: pass pgdat to wakeup_kswapd()include/linux/mmzone.h mm/page_alloc.c mm/vmscan.c+7 -110 replies
9/19mm, vmscan: use for_each_node in shrink_zones()mm/vmscan.c+30 -230 replies
10/19mm, page_alloc: use for_each_node in wake_all_kswapds()mm/page_alloc.c+4 -70 replies
11/19mm, mempolicy: use first_node in mempolicy_slab_node()mm/mempolicy.c+9 -90 replies
12/19mm, mempolicy: use first_node in mpol_misplaced()mm/mempolicy.c+1 -30 replies
13/19mm, page_alloc: use first_node in local_memory_node()mm/page_alloc.c+2 -60 replies
14/19mm, compaction: rename compaction_zonelist_suitableinclude/linux/compaction.h mm/compaction.c mm/page_alloc.c+3 -30 replies
15/19mm, mm_init: rename mminit_verify_zonelistmm/internal.h mm/mm_init.c mm/page_alloc.c+4 -40 replies
16/19mm, page_alloc: cleanup build_zonelistsinclude/linux/mmzone.h init/main.c mm/memory_hotplug.c +1 more+15 -150 replies
17/19mm, memory_hotplug: cleanup online_pages()mm/memory_hotplug.c+5 -50 replies
18/19kernel, sysctl: cleanup numa_zonelist_orderinclude/linux/mmzone.h kernel/sysctl.c mm/page_alloc.c+15 -150 replies
19/19mm, mmzone: cleanup zonelist in commentsarch/hexagon/mm/init.c arch/ia64/include/asm/topology.h arch/x86/mm/numa.c +9 more+41 -420 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC v1 00/19] Modify zonelist to nodelist v1

Motivation
----------
Currently if we want to iterate through all the nodes we have to traverse all the zones from the zonelist.

So in order to reduce the number of loops required to traverse node, this series of patches modified the zonelist to nodelist.

Two new macros have been introduced:
1) for_each_node_nlist
2) for_each_node_nlist_nodemask

Benefit
-------
1. For a NUMA system with N nodes, each node has M zones, the number of loops is reduced from N*M times to N times when traversing node.

2. The size of pg_data_t is much reduced.

Test Result
-----------
Currently I have only performed a simple page allocation benchmark test on my laptop, and the results show that the performance of a system with only one node is almost unaffected.

Others
------
Next I will do more performance testing and add it to the Test Result.

Since I don't currently have multiple node NUMA systems, I would be grateful if anyone would like to test this series of patches.

I am still not sure this series of patches is on the right way so I am sending this as an RFC.

Any comments are highly appreciated.

Pengfei Li (19):
mm, mmzone: modify zonelist to nodelist
mm, hugetlb: use for_each_node in dequeue_huge_page_nodemask() mm, oom_kill: use for_each_node in constrained_alloc() mm, slub: use for_each_node in get_any_partial()
mm, slab: use for_each_node in fallback_alloc()
mm, vmscan: use for_each_node in do_try_to_free_pages() mm, vmscan: use first_node in throttle_direct_reclaim() mm, vmscan: pass pgdat to wakeup_kswapd()
mm, vmscan: use for_each_node in shrink_zones()
mm, page_alloc: use for_each_node in wake_all_kswapds() mm, mempolicy: use first_node in mempolicy_slab_node() mm, mempolicy: use first_node in mpol_misplaced() mm, page_alloc: use first_node in local_memory_node() mm, compaction: rename compaction_zonelist_suitable mm, mm_init: rename mminit_verify_zonelist
mm, page_alloc: cleanup build_zonelists
mm, memory_hotplug: cleanup online_pages()
kernel, sysctl: cleanup numa_zonelist_order
mm, mmzone: cleanup zonelist in comments

 arch/hexagon/mm/init.c           |   2 +-
 arch/ia64/include/asm/topology.h |   2 +-
 arch/x86/mm/numa.c               |   2 +-
 drivers/tty/sysrq.c              |   2 +-
 include/linux/compaction.h       |   2 +-
 include/linux/gfp.h              |  18 +-
 include/linux/mmzone.h           | 249 +++++++++++++------------
 include/linux/oom.h              |   4 +-
 include/linux/swap.h             |   2 +-
 include/trace/events/oom.h       |   9 +-
 init/main.c                      |   2 +-
 kernel/cgroup/cpuset.c           |   4 +-
 kernel/sysctl.c                  |   8 +-
 mm/compaction.c                  |  20 +-
 mm/hugetlb.c                     |  21 +--
 mm/internal.h                    |  13 +-
 mm/memcontrol.c                  |   2 +-
 mm/memory_hotplug.c              |  24 +--
 mm/mempolicy.c                   |  26 ++-
 mm/mm_init.c                     |  74 +++++---
 mm/mmzone.c                      |  30 ++-
 mm/oom_kill.c                    |  16 +-
 mm/page_alloc.c                  | 301 ++++++++++++++++---------------
 mm/slab.c                        |  13 +-
 mm/slub.c                        |  14 +-
 mm/vmscan.c                      | 149 ++++++++-------
 26 files changed, 518 insertions(+), 491 deletions(-)
Signature · 1 line
2.23.0