mcreboot: offline/re-online RAM before IHK reserve

This commit is contained in:
Balazs Gerofi
2017-02-07 04:31:17 +09:00
parent 182202523e
commit bf036f19f7

View File

@ -324,8 +324,16 @@ if ! grep ihk_smp_x86 /proc/modules &>/dev/null; then
error_exit "ihk_loaded"
fi
# Free MCDRAM (special case for OFP SNC-4 mode)
# Offline-reonline RAM (special case for OFP SNC-4 mode)
if [ "`hostname | grep "c[0-9][0-9][0-9][0-9].ofp"`" != "" ] && [ "`cat /sys/devices/system/node/online`" == "0-7" ]; then
for i in 0 1 2 3; do
find /sys/devices/system/node/node$i/memory*/ -name "online" | while read f; do
echo 0 > $f 2>&1 > /dev/null;
done
find /sys/devices/system/node/node$i/memory*/ -name "online" | while read f; do
echo 1 > $f 2>&1 > /dev/null;
done
done
for i in 4 5 6 7; do
find /sys/devices/system/node/node$i/memory*/ -name "online" | while read f; do
echo 0 > $f 2>&1 > /dev/null;