diff options
author | David Hildenbrand <[email protected]> | 2020-04-24 10:39:04 +0200 |
---|---|---|
committer | Vasily Gorbik <[email protected]> | 2020-05-20 10:22:51 +0200 |
commit | 4765600fc7aa2f650951c3d0ed19e04e4c9e4b06 (patch) | |
tree | 8bc5127fe3c6436349af4599e4b172fa622a0875 /scripts/gcc-plugins/cyc_complexity_plugin.c | |
parent | e5794cf1a270d813a5b9373a6876487d4d154195 (diff) |
s390: simplify memory notifier for protecting kdump crash kernel area
Assume we have a crashkernel area of 256MB reserved:
root@vm0:~# cat /proc/iomem
00000000-6fffffff : System RAM
0f258000-0fcfffff : Kernel code
0fd00000-101d10e3 : Kernel data
105b3000-1068dfff : Kernel bss
70000000-7fffffff : Crash kernel
This exactly corresponds to memory block 7 (memory block size is 256MB).
Trying to offline that memory block results in:
root@vm0:~# echo "offline" > /sys/devices/system/memory/memory7/state
-bash: echo: write error: Device or resource busy
[ 128.458762] page:000003d081c00000 refcount:1 mapcount:0 mapping:00000000d01cecd4 index:0x0
[ 128.458773] flags: 0x1ffff00000001000(reserved)
[ 128.458781] raw: 1ffff00000001000 000003d081c00008 000003d081c00008 0000000000000000
[ 128.458781] raw: 0000000000000000 0000000000000000 ffffffff00000001 0000000000000000
[ 128.458783] page dumped because: unmovable page
The craskernel area is marked reserved in the bootmem allocator. This
results in the memmap getting initialized (refcount=1, PG_reserved), but
the pages are never freed to the page allocator.
So these pages look like allocated pages that are unmovable (esp.
PG_reserved), and therefore, memory offlining fails early, when trying to
isolate the page range.
We only have to care about the exchange area, make that clear.
Signed-off-by: David Hildenbrand <[email protected]>
Reviewed-by: Gerald Schaefer <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Vasily Gorbik <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Cc: Philipp Rudo <[email protected]>
Cc: Gerald Schaefer <[email protected]>
Cc: Eric W. Biederman <[email protected]>
Cc: Michal Hocko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Christian Borntraeger <[email protected]>
Signed-off-by: Vasily Gorbik <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions