linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] mm/memory_hotplug: Factor out memory block device handling
@ 2019-04-08 10:12 David Hildenbrand
  2019-04-08 10:12 ` [PATCH RFC 1/3] mm/memory_hotplug: Simplify and fix check_hotplug_memory_range() David Hildenbrand
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: David Hildenbrand @ 2019-04-08 10:12 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Greg Kroah-Hartman, Rafael J . Wysocki,
	Ingo Molnar, Andrew Banman, mike.travis, Jonathan Cameron,
	Oscar Salvador, Michal Hocko, Pavel Tatashin, Wei Yang, Qian Cai,
	Arun KS, Mathieu Malaterre, linux-mm, dan.j.williams,
	David Hildenbrand

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

-- 
2.17.2


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

end of thread, other threads:[~2019-04-09  9:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-08 10:12 [PATCH RFC 0/3] mm/memory_hotplug: Factor out memory block device handling David Hildenbrand
2019-04-08 10:12 ` [PATCH RFC 1/3] mm/memory_hotplug: Simplify and fix check_hotplug_memory_range() David Hildenbrand
2019-04-08 10:12 ` [PATCH RFC 2/3] mm/memory_hotplug: Create memory block devices after arch_add_memory() David Hildenbrand
2019-04-09  7:33   ` David Hildenbrand
2019-04-08 10:12 ` [PATCH RFC 3/3] mm/memory_hotplug: Remove memory block devices before arch_remove_memory() David Hildenbrand
2019-04-09  9:18   ` Oscar Salvador
2019-04-09  9:25     ` David Hildenbrand

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