Transparent hugepages are on by default. Disable it in kdump kernel by
adding the parameter 'transparent_hugepage=never'. This might help us
with some of the memory issues we are facing.
>From my test on two arch, not only there are no any bad effect on saving vmcore
after turn off THP, but also we can get more 'MemAvailable:' in the kdump kernel.
1)x86_64
without the parameter
=====================
kdump:/# cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.10.0-229.el7.x86_64 root=/dev/mapper/rhel_ibm--x3250m4--01-root ro rd.lvm.lv=rhel_ibm-x3250m4-01/swap console=ttyS0,115200n8 rd.lvm.lv=rhel_ibm-x3250m4-01/root LANG=en_US.UTF-8 irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 rootflags=nofail acpi_no_memhotplug disable_cpu_apicid=0 elfcorehdr=869764K
kdump:/# cat /proc/meminfo
MemTotal: 145492 kB
MemFree: 68284 kB
MemAvailable: 111632 kB <<------
Buffers: 36 kB
Cached: 48184 kB
...
added the parameter
=====================
kdump:/# cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.10.0-229.el7.x86_64 root=/dev/mapper/rhel_ibm--x3250m4--01-root ro rd.lvm.lv=rhel_ibm-x3250m4-01/swap console=ttyS0,115200n8 rd.lvm.lv=rhel_ibm-x3250m4-01/root LANG=en_US.UTF-8 irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 rootflags=nofail acpi_no_memhotplug transparent_hugepage=never disable_cpu_apicid=0 elfcorehdr=869764K
kdump:/# cat /proc/meminfo
MemTotal: 145492 kB
MemFree: 68388 kB
MemAvailable: 111728 kB <<-------
...
VmallocChunk: 34359659520 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
...
2)ppc64
without the parameter
====================
kdump:/# cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.10.0-229.el7.ppc64 root=/dev/mapper/rhel_ibm--p8--05--lp6-root ro rd.lvm.lv=rhel_ibm-p8-05-lp6/root rd.lvm.lv=rhel_ibm-p8-05-lp6/swap LANG=en_US.UTF-8 irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 rootflags=nofail kvm_cma_resv_ratio=0 elfcorehdr=154880K
kdump:/# cat /proc/meminfo
MemTotal: 480832 kB
MemFree: 293952 kB
MemAvailable: 427840 kB <<--------
mallocUsed: 23680 kB
VmallocChunk: 8589901824 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
...
added the parameter
===================
kdump:/# cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.10.0-229.el7.ppc64 root=/dev/mapper/rhel_ibm--p8--05--lp6-root ro rd.lvm.lv=rhel_ibm-p8-05-lp6/root rd.lvm.lv=rhel_ibm-p8-05-lp6/swap LANG=en_US.UTF-8 irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 rootflags=nofail kvm_cma_resv_ratio=0 transparent_hugepage=never elfcorehdr=154880K
kdump:/# cat /proc/meminfo
MemTotal: 480832 kB
MemFree: 294592 kB
MemAvailable: 428480 kB <<-------
...
HugePages_Total: 0
Signed-off-by: Li Wang <liwang(a)redhat.com>
---
kdump.sysconfig.i386 | 2 +-
kdump.sysconfig.ppc64 | 2 +-
kdump.sysconfig.ppc64le | 2 +-
kdump.sysconfig.s390x | 2 +-
kdump.sysconfig.x86_64 | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/kdump.sysconfig.i386 b/kdump.sysconfig.i386
index 84b2447..bb7a6e5 100644
--- a/kdump.sysconfig.i386
+++ b/kdump.sysconfig.i386
@@ -16,7 +16,7 @@ KDUMP_COMMANDLINE=""
# This variable lets us append arguments to the current kdump commandline
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
-KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices numa=off udev.children-max=2 panic=10 rootflags=nofail"
+KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices numa=off udev.children-max=2 panic=10 rootflags=nofail transparent_hugepage=never"
# Any additional kexec arguments required. In most situations, this should
# be left empty
diff --git a/kdump.sysconfig.ppc64 b/kdump.sysconfig.ppc64
index 5295626..dd09598 100644
--- a/kdump.sysconfig.ppc64
+++ b/kdump.sysconfig.ppc64
@@ -16,7 +16,7 @@ KDUMP_COMMANDLINE=""
# This variable lets us append arguments to the current kdump commandline
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
-KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 rootflags=nofail kvm_cma_resv_ratio=0"
+KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 rootflags=nofail kvm_cma_resv_ratio=0 transparent_hugepage=never"
# Any additional kexec arguments required. In most situations, this should
# be left empty
diff --git a/kdump.sysconfig.ppc64le b/kdump.sysconfig.ppc64le
index 5295626..dd09598 100644
--- a/kdump.sysconfig.ppc64le
+++ b/kdump.sysconfig.ppc64le
@@ -16,7 +16,7 @@ KDUMP_COMMANDLINE=""
# This variable lets us append arguments to the current kdump commandline
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
-KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 rootflags=nofail kvm_cma_resv_ratio=0"
+KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10 rootflags=nofail kvm_cma_resv_ratio=0 transparent_hugepage=never"
# Any additional kexec arguments required. In most situations, this should
# be left empty
diff --git a/kdump.sysconfig.s390x b/kdump.sysconfig.s390x
index 745dd27..b103a88 100644
--- a/kdump.sysconfig.s390x
+++ b/kdump.sysconfig.s390x
@@ -16,7 +16,7 @@ KDUMP_COMMANDLINE=""
# This variable lets us append arguments to the current kdump commandline
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
-KDUMP_COMMANDLINE_APPEND="nr_cpus=1 cgroup_disable=memory numa=off udev.children-max=2 panic=10 rootflags=nofail"
+KDUMP_COMMANDLINE_APPEND="nr_cpus=1 cgroup_disable=memory numa=off udev.children-max=2 panic=10 rootflags=nofail transparent_hugepage=never"
# Any additional /sbin/mkdumprd arguments required.
MKDUMPRD_ARGS=""
diff --git a/kdump.sysconfig.x86_64 b/kdump.sysconfig.x86_64
index d9ad9b5..7991d68 100644
--- a/kdump.sysconfig.x86_64
+++ b/kdump.sysconfig.x86_64
@@ -16,7 +16,7 @@ KDUMP_COMMANDLINE=""
# This variable lets us append arguments to the current kdump commandline
# As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
-KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 rootflags=nofail acpi_no_memhotplug"
+KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10 rootflags=nofail acpi_no_memhotplug transparent_hugepage=never"
# Any additional kexec arguments required. In most situations, this should
# be left empty
--
1.8.3.1