Skip to content

mm, memory_hotplug: handle unitialized numa node gracefully

Michal Hocko linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 41 repliesIn review 5 of 6 applied

Patches in v1 5 of 6 applied

#Subject and filesSizeRepliesApplied
1/6mm, memory_hotplug: make arch_alloc_nodedata independent on CONFIG_MEMORY_HOTPLUGarch/ia64/mm/discontig.c include/linux/memory_hotplug.h+59 -624 repliesApplied
2/6mm: handle uninitialized numa nodes gracefullyarch/ia64/mm/discontig.c include/linux/memory_hotplug.h mm/memory_hotplug.c +1 more+43 -1818 replies
3/6mm, memory_hotplug: drop arch_free_nodedataarch/ia64/mm/discontig.c include/linux/memory_hotplug.h mm/memory_hotplug.c+0 -184 repliesApplied
4/6mm, memory_hotplug: reorganize new pgdat initializationinclude/linux/memory_hotplug.h mm/memory_hotplug.c mm/page_alloc.c+27 -287 repliesApplied
5/6mm: make free_area_init_node aware of memory less nodesmm/page_alloc.c+8 -34 repliesApplied
6/6memcg: do not tweak node in alloc_mem_cgroup_per_node_infomm/memcontrol.c+2 -124 repliesApplied

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchRafael AquiniAlexey MakhalovDavid HildenbrandMike RapoportOscar SalvadorWei Yang
1/6A-b A-b A-b R-b R-b
2/6A-b T-b A-b T-b T-b T-b A-b A-b A-b A-b R-b R-b
3/6A-b A-b A-b R-b R-b
4/6A-b A-b R-b R-b
5/6A-b A-b R-b R-b R-b
6/6A-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v1 thread

Cover letter [PATCH 0/6] mm, memory_hotplug: handle unitialized numa node gracefully

Hi,
the previous version of this patchset has been posted her:
http://lkml.kernel.org/r/[email protected]

I have ended up with 6 patches in the end. The core of the fix is patch 2 which also links existing bug reports. The high level goal is to have all possible numa nodes have their pgdat allocated and initialized so
for_each_possible_node(nid)
NODE_DATA(nid)
will never return a garbage. This has proven to be problem in several places when an offline numa node is used for an allocation just to realize that node_data and therefore allocation fallback zonelists are not initialized and such an allocation request blows up.

There were attempts to address that by checking node_online in several places including the page allocator. This patchset approaches the problem from a different perspective and instead of special casing, which just adds a runtime overhead, it allocates pglist_data for each possible node. This can add some memory overhead for platforms with high number of possible nodes if they do not contain any memory. This should be a rather rare configuration though.

How to test this? David has provided and excellent howto:
http://lkml.kernel.org/r/[email protected]

Patches 1 and 3-6 are mostly cleanups. The patchset has been reviewed by Rafael (thanks!) and the core fix tested by Rafael and Alexey (thanks to both). David has tested as per instructions above and hasn't found any fallouts in the memory hotplug scenarios.

Please consider for inclusion.

Thanks!

Diffstat:

 arch/ia64/mm/discontig.c       |  11 +---
 include/linux/memory_hotplug.h | 118 ++++++++++++++++++++---------------------
 mm/memcontrol.c                |  14 +----
 mm/memory_hotplug.c            |  55 ++++---------------
 mm/page_alloc.c                |  70 +++++++++++++++++++++---
 5 files changed, 133 insertions(+), 135 deletions(-)