linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] mm, memory_hotplug: handle unitialized numa node gracefully
@ 2022-01-27  8:52 Michal Hocko
  2022-01-27  8:53 ` [PATCH 1/6] mm, memory_hotplug: make arch_alloc_nodedata independent on CONFIG_MEMORY_HOTPLUG Michal Hocko
                   ` (5 more replies)
  0 siblings, 6 replies; 48+ messages in thread
From: Michal Hocko @ 2022-01-27  8:52 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, LKML, David Hildenbrand, Alexey Makhalov, Dennis Zhou,
	Eric Dumazet, Oscar Salvador, Tejun Heo, Christoph Lameter,
	Nico Pache, Wei Yang, Rafael Aquini

Hi,
the previous version of this patchset has been posted her:
http://lkml.kernel.org/r/20211214100732.26335-1-mhocko@kernel.org

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/6e5ebc19-890c-b6dd-1924-9f25c441010d@redhat.com

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(-)



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

end of thread, other threads:[~2022-02-17 10:40 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-27  8:52 [PATCH 0/6] mm, memory_hotplug: handle unitialized numa node gracefully Michal Hocko
2022-01-27  8:53 ` [PATCH 1/6] mm, memory_hotplug: make arch_alloc_nodedata independent on CONFIG_MEMORY_HOTPLUG Michal Hocko
2022-01-27 12:27   ` David Hildenbrand
2022-01-27 13:36   ` Mike Rapoport
2022-01-28  6:18   ` Oscar Salvador
2022-02-01  2:13   ` Wei Yang
2022-01-27  8:53 ` [PATCH 2/6] mm: handle uninitialized numa nodes gracefully Michal Hocko
2022-01-27 12:41   ` David Hildenbrand
2022-01-27 14:50     ` Michal Hocko
2022-01-27 13:37   ` Mike Rapoport
2022-01-27 14:47     ` Michal Hocko
2022-01-27 15:04       ` Mike Rapoport
2022-02-01  2:41       ` Wei Yang
2022-02-01  9:54         ` Michal Hocko
2022-02-03  0:21           ` Wei Yang
2022-02-03  7:23             ` Mike Rapoport
2022-02-03  8:27               ` David Hildenbrand
2022-02-03  9:08                 ` Mike Rapoport
2022-02-03  9:11                   ` David Hildenbrand
2022-02-03  9:19                     ` Michal Hocko
2022-02-03  9:21                       ` David Hildenbrand
2022-02-03  8:39               ` Michal Hocko
2022-02-04 22:54                 ` Andrew Morton
2022-01-28  6:27   ` Oscar Salvador
2022-01-31 10:34   ` Michal Hocko
2022-01-27  8:53 ` [PATCH 3/6] mm, memory_hotplug: drop arch_free_nodedata Michal Hocko
2022-01-27 12:42   ` David Hildenbrand
2022-01-27 13:37   ` Mike Rapoport
2022-01-28  6:29   ` Oscar Salvador
2022-02-01  2:41   ` Wei Yang
2022-01-27  8:53 ` [PATCH 4/6] mm, memory_hotplug: reorganize new pgdat initialization Michal Hocko
2022-01-27 12:46   ` David Hildenbrand
2022-01-27 14:44     ` Michal Hocko
2022-02-17 10:40       ` Oscar Salvador
2022-01-27 13:39   ` Mike Rapoport
2022-01-27 14:45     ` Michal Hocko
2022-01-28 10:51   ` Oscar Salvador
2022-02-01  2:42   ` Wei Yang
2022-01-27  8:53 ` [PATCH 5/6] mm: make free_area_init_node aware of memory less nodes Michal Hocko
2022-01-27 12:47   ` David Hildenbrand
2022-01-27 13:34   ` Mike Rapoport
2022-01-28 10:59   ` Oscar Salvador
2022-02-01  2:43   ` Wei Yang
2022-01-27  8:53 ` [PATCH 6/6] memcg: do not tweak node in alloc_mem_cgroup_per_node_info Michal Hocko
2022-01-27 12:50   ` David Hildenbrand
2022-01-28 11:01   ` Oscar Salvador
2022-02-01  2:45   ` Wei Yang
2022-02-01  9:51     ` Michal Hocko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).