From f284a80656a5980f2cb42ee5a07d22cd5a2fc2c0 Mon Sep 17 00:00:00 2001 From: Masamichi Takagi Date: Tue, 25 Oct 2016 16:35:43 +0900 Subject: [PATCH] Defrag memory in mcreboot.sh Merge free physical pages to create large, physically contiguous blocks with the following command. echo 1 > /proc/sys/vm/compact_memory --- arch/x86/tools/mcreboot-smp-x86.sh.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/tools/mcreboot-smp-x86.sh.in b/arch/x86/tools/mcreboot-smp-x86.sh.in index b6253a30..56438fb1 100644 --- a/arch/x86/tools/mcreboot-smp-x86.sh.in +++ b/arch/x86/tools/mcreboot-smp-x86.sh.in @@ -144,6 +144,9 @@ fi # 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 + # Load IHK-SMP if not loaded and reserve CPUs and memory if [ "`lsmod | grep ihk_smp_x86`" == "" ]; then ihk_irq=""