forked from pool/s390-tools
36 lines
1.3 KiB
Diff
36 lines
1.3 KiB
Diff
|
Subject: [PATCH] [BZ 156627] chmem: try to online memory to zone movable
|
||
|
From: Gerald Schaefer <gerald.schaefer@de.ibm.com>
|
||
|
|
||
|
Description: chmem: try to online memory to zone movable
|
||
|
Symptom: Standby/reserved memory that is onlined with chmem will be set
|
||
|
online to zone normal, instead of zone movable, and so it is much
|
||
|
less likely to be able to be offlined again.
|
||
|
Problem: With recent kernels, the default zone for hotplug memory was
|
||
|
changed from zone movable to zone normal.
|
||
|
Solution: Let chmem first try to online memory to the zone movable, before
|
||
|
setting it online to the default zone.
|
||
|
Reproduction: Set standby/reserved memory online with chmem, and check
|
||
|
/proc/zoneinfo for zone allocation.
|
||
|
Upstream-ID: -
|
||
|
Problem-ID: 156627
|
||
|
|
||
|
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
|
||
|
---
|
||
|
zconf/chmem | 5 ++++-
|
||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||
|
|
||
|
--- a/zconf/chmem
|
||
|
+++ b/zconf/chmem
|
||
|
@@ -86,7 +86,10 @@ sub chmem_online($)
|
||
|
{
|
||
|
my $block = shift;
|
||
|
|
||
|
- qx(echo online > $memdir/memory$block/state 2>/dev/null);
|
||
|
+ qx(echo online_movable > $memdir/memory$block/state 2>/dev/null);
|
||
|
+ if ($? >> 8 != 0) {
|
||
|
+ qx(echo online > $memdir/memory$block/state 2>/dev/null);
|
||
|
+ }
|
||
|
return $? >> 8;
|
||
|
}
|
||
|
|