diff options
author | Yunhong Jiang <yunhong.jiang@linux.intel.com> | 2015-12-04 14:58:39 -0500 |
---|---|---|
committer | Yunhong Jiang <yunhong.jiang@linux.intel.com> | 2016-01-05 19:32:47 -0800 |
commit | d255b23605ecd2c47598ca96c1d1042bb1b7ee87 (patch) | |
tree | a95230eb194ae93c3b8f59a2e697ec47d9990a36 /ci/envs/guest-setup1.sh | |
parent | bbfa2a7a09611186681e494844af228c18217941 (diff) |
Add guest environment setup scripts
To achieve good real time and live migration performance, special setup
is needed on guest environment.
Two scripts are used to setup the guest environment. The guest-setup0.sh
setup the environment that should take effect before the tested kernel is
bringup, including install the kernel rpm, the rt-test package and modify
the grub entries. The guest-setup1.sh setup the environment that takes
effect after the tested kernel is up, like some sysfs entry, interrupt
affinity etc.
Change-Id: Icaed71e250b314723d6b1814c9ac33c10d99c6a0
Signed-off-by: David Su <david.w.su@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@linux.intel.com>
Diffstat (limited to 'ci/envs/guest-setup1.sh')
-rwxr-xr-x | ci/envs/guest-setup1.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ci/envs/guest-setup1.sh b/ci/envs/guest-setup1.sh new file mode 100755 index 000000000..678baa43b --- /dev/null +++ b/ci/envs/guest-setup1.sh @@ -0,0 +1,26 @@ +#!/bin/bash +############################################################################## +## Copyright (c) 2015 Intel Corp. +## +## All rights reserved. This program and the accompanying materials +## are made available under the terms of the Apache License, Version 2.0 +## which accompanies this distribution, and is available at +## http://www.apache.org/licenses/LICENSE-2.0 +############################################################################### + +set_irq_affinity () { + for irq in /proc/irq/* ; do + echo 0 > /proc/irq/${1}/smp_affinity_list + done +} + +# Disable watchdogs to reduce overhead +echo 0 > /proc/sys/kernel/watchdog +echo 0 > /proc/sys/kernel/nmi_watchdog + +# Route device interrupts to non-RT CPU +set_irq_affinity + +# Disable RT throttling +echo -1 > /proc/sys/kernel/sched_rt_period_us +echo -1 > /proc/sys/kernel/sched_rt_runtime_us |