diff options
author | David Hildenbrand <[email protected]> | 2020-05-07 16:01:32 +0200 |
---|---|---|
committer | Michael S. Tsirkin <[email protected]> | 2020-06-04 15:36:52 -0400 |
commit | 08b3acd7a68fc17902e1cb6b146389322840deab (patch) | |
tree | a97a406e124fe81ce4317a9ed7d31a3a80c24869 /tools/perf/scripts/python/bin/export-to-postgresql-report | |
parent | 8e5c921ca0cd9aa59386e6be4b86b32f0ba7296b (diff) |
mm/memory_hotplug: Introduce offline_and_remove_memory()
virtio-mem wants to offline and remove a memory block once it unplugged
all subblocks (e.g., using alloc_contig_range()). Let's provide
an interface to do that from a driver. virtio-mem already supports to
offline partially unplugged memory blocks. Offlining a fully unplugged
memory block will not require to migrate any pages. All unplugged
subblocks are PageOffline() and have a reference count of 0 - so
offlining code will simply skip them.
All we need is an interface to offline and remove the memory from kernel
module context, where we don't have access to the memory block devices
(esp. find_memory_block() and device_offline()) and the device hotplug
lock.
To keep things simple, allow to only work on a single memory block.
Acked-by: Michal Hocko <[email protected]>
Tested-by: Pankaj Gupta <[email protected]>
Acked-by: Andrew Morton <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Pavel Tatashin <[email protected]>
Cc: Wei Yang <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Qian Cai <[email protected]>
Signed-off-by: David Hildenbrand <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Michael S. Tsirkin <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions