The 'nx_huge_pages' option, will force any executable page mapping to be performed at 4KiB granularity and requires any existing overlapping huge-page mapping to be also split in 4KiB chunks[1]. This is due to a HW bug that doesn't affect our NFV use-cases. The way a huge-page mapping is dropped is by simply deleting the EPT entry and flushing TLB caches on all affected CPUs. Next vCPU access to that address will trigger an EPT_VIOLATION, which will jump into the host for it to handle the page-fault. In our specific case, this means all isolated CPUs running oslat will hit an EPT_VIOLATION almost exactly at the same time. Which is bad enough already, but, given our systems might have a huge number of isolated CPUs, will also create a lot of contention over the KVM MMU lock. This has been observed to trigger ~100us latency spikes while testing with oslat. So let's disable the 'kvm.nx_huge_pages' module option. [1] see kernel commit b7e8c8303ff28 Resolves: rhbz#1976825 Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
51 lines
1.4 KiB
Bash
Executable file
51 lines
1.4 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
. /usr/lib/tuned/functions
|
|
|
|
start() {
|
|
setup_kvm_mod_low_latency
|
|
return 0
|
|
}
|
|
|
|
stop() {
|
|
if [ "$1" = "full_rollback" ]; then
|
|
teardown_kvm_mod_low_latency
|
|
fi
|
|
return "$?"
|
|
}
|
|
|
|
verify() {
|
|
retval=0
|
|
|
|
# set via /etc/modprobe.d/kvm.conf and /etc/modprobe.d/kvm.rt.tuned.conf
|
|
if [ -f /sys/module/kvm/parameters/kvmclock_periodic_sync ]; then
|
|
kps=$(cat /sys/module/kvm/parameters/kvmclock_periodic_sync)
|
|
if [ "$kps" = "N" -o "$kps" = "0" ]; then
|
|
echo " kvmclock_periodic_sync:($kps): disabled: okay"
|
|
else
|
|
echo " kvmclock_periodic_sync:($kps): enabled: expected N(0)"
|
|
retval=1
|
|
fi
|
|
fi
|
|
if [ -f /sys/module/kvm_intel/parameters/ple_gap ]; then
|
|
ple_gap=$(cat /sys/module/kvm_intel/parameters/ple_gap)
|
|
if [ $ple_gap -eq 0 ]; then
|
|
echo " ple_gap:($ple_gap): disabled: okay"
|
|
else
|
|
echo " ple_gap:($ple_gap): enabled: expected 0"
|
|
retval=1
|
|
fi
|
|
fi
|
|
if [ -f /sys/module/kvm/parameters/nx_huge_pages ]; then
|
|
kps=$(cat /sys/module/kvm/parameters/nx_huge_pages)
|
|
if [ "$kps" = "N" -o "$kps" = "0" ]; then
|
|
echo " kvmclock_periodic_sync:($kps): disabled: okay"
|
|
else
|
|
echo " kvmclock_periodic_sync:($kps): enabled: expected N(0)"
|
|
retval=1
|
|
fi
|
|
fi
|
|
return $retval
|
|
}
|
|
|
|
process $@
|