From 2f0c2aae9e819f461dd989bb25aa0fe5dad729fc Mon Sep 17 00:00:00 2001 From: Balazs Gerofi Date: Thu, 7 Jun 2018 07:15:35 +0900 Subject: [PATCH] OFP: avoid drop_caches in mcreboot --- arch/x86_64/tools/mcreboot-smp-x86.sh.in | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/arch/x86_64/tools/mcreboot-smp-x86.sh.in b/arch/x86_64/tools/mcreboot-smp-x86.sh.in index 41476143..55bb71e8 100644 --- a/arch/x86_64/tools/mcreboot-smp-x86.sh.in +++ b/arch/x86_64/tools/mcreboot-smp-x86.sh.in @@ -85,6 +85,9 @@ do esac done +redirect_kmsg=0 +turbo="turbo" + # Start ihkmond pid=`pidof ihkmond` if [ "${pid}" != "" ]; then @@ -302,16 +305,19 @@ if ! grep -E 'ihk\s' /proc/modules &>/dev/null; then fi fi -# Increase swappiness so that we have better chance to allocate memory for IHK -echo 100 > /proc/sys/vm/swappiness +# Fujitsu drops caches for us in between jobs so don't do it on OFP +if [ "`hostname | grep "c[0-9][0-9][0-9][0-9].ofp"`" == "" ]; then + # Increase swappiness so that we have better chance to allocate memory for IHK + echo 100 > /proc/sys/vm/swappiness -# Drop Linux caches to free memory -sync && echo 3 > /proc/sys/vm/drop_caches + # Drop Linux caches to free memory + sync && echo 3 > /proc/sys/vm/drop_caches -# Merge free memory areas into large, physically contigous ones -echo 1 > /proc/sys/vm/compact_memory 2>/dev/null + # Merge free memory areas into large, physically contigous ones + echo 1 > /proc/sys/vm/compact_memory 2>/dev/null -sync + sync +fi # Load IHK-SMP if not loaded and reserve CPUs and memory if ! grep ihk_smp_@ARCH@ /proc/modules &>/dev/null; then