diff options
author | Pierre Pfister <ppfister@cisco.com> | 2016-11-04 15:39:10 +0000 |
---|---|---|
committer | Pierre Pfister <ppfister@cisco.com> | 2016-11-04 15:39:10 +0000 |
commit | 08e0618fef8173d3c94d64bce69f34d26f6a1f1c (patch) | |
tree | 43ffc8d21c4931607cd876ef3bcae35844a7b1f8 /vhost-test | |
parent | e0d34a1f05a002fcc34e286460114b180fdc6330 (diff) |
Adding CPU jitter elimination tricks
Change-Id: I70bc1f5cff21ecbba734fa44cd2d94a1e5be8e9a
Signed-off-by: Pierre Pfister <ppfister@cisco.com>
Diffstat (limited to 'vhost-test')
-rwxr-xr-x | vhost-test/vhost.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/vhost-test/vhost.sh b/vhost-test/vhost.sh index c80e39f..552bdc5 100755 --- a/vhost-test/vhost.sh +++ b/vhost-test/vhost.sh @@ -444,6 +444,8 @@ function start() { touch "$TMP_DIR/.started" + echo "0" | sudo tee /proc/sys/kernel/watchdog_cpumask + start_vpp vmdir_mount @@ -466,6 +468,12 @@ function pin_vm() { } function pin_vpp() { + + for i in $(ls /proc/irq/ | grep [0-9]); do + echo 1 | sudo tee /proc/irq/$i/smp_affinity > /dev/null || true ; + done + + PIDS=$(ps -eLf | grep /bin/vpp | awk '$5 > 50 { print $4; }') idx=0 for p in $PIDS; do @@ -515,6 +523,24 @@ function cmd_pin() { pin } +function cmd_turbo_disable() { + load_config + sudo modprobe msr + echo "Disabling turboboost on CPUs $CORES_VPP_LIST $CORES_VM_LIST" + for cpu in $CORES_VPP_LIST $CORES_VM_LIST ; do + sudo wrmsr -p ${cpu} 0x1a0 0x4000850089 + done +} + +function cmd_turbo_enable() { + load_config + sudo modprobe msr + echo "Enabling turboboost on CPUs $CORES_VPP_LIST $CORES_VM_LIST" + for cpu in $CORES_VPP_LIST $CORES_VM_LIST ; do + sudo wrmsr -p ${cpu} 0x1a0 0x850089 + done +} + function cmd_stop() { load_config stop |