Skip to content

RFC mm/memory_hotplug: Factor out memory block device handling

David Hildenbrand linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3mm/memory_hotplug: Simplify and fix check_hotplug_memory_range()mm/memory_hotplug.c+3 -80 replies
2/3mm/memory_hotplug: Create memory block devices after arch_add_memory()drivers/base/memory.c include/linux/memory.h mm/memory_hotplug.c+53 -331 reply
3/3mm/memory_hotplug: Remove memory block devices before arch_remove_memory()drivers/base/memory.c drivers/base/node.c include/linux/memory.h +2 more+25 -412 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH RFC 0/3] mm/memory_hotplug: Factor out memory block device handling

We only want memory block devices for memory to be onlined/offlined (add/remove from the buddy). This is required so user space can online/offline memory and kdump gets notified about newly onlined memory.

Only such memory has the requirement of having to span whole memory blocks. Let's factor out creation/removal of memory block devices.

This not only allows to clean up arch_add_memory() to get rid of want_memblock, but also reduces locking overhead and eventually allows us to handle errors while adding memory in a nicer fashion.

Only did a quick sanity test with DIMM plug/unplug. This should be sufficient to discuss the general approach. Patches are against next/master.

David Hildenbrand (3):
mm/memory_hotplug: Simplify and fix check_hotplug_memory_range() mm/memory_hotplug: Create memory block devices after arch_add_memory() mm/memory_hotplug: Remove memory block devices before
arch_remove_memory()

 drivers/base/memory.c  | 108 +++++++++++++++++++++--------------------
 drivers/base/node.c    |   7 ++-
 include/linux/memory.h |   4 +-
 include/linux/node.h   |   6 +--
 mm/memory_hotplug.c    |  38 +++++++--------
 5 files changed, 81 insertions(+), 82 deletions(-)
Signature · 1 line
2.17.2