1
0
Fork 0
tuned/profiles/cpu-partitioning/script.sh
Jaroslav Škarvada db6947da2f profiles: added new profile cpu-partitioning
The profile is delivered in the new tuned-profiles-cpu-partitioning subpackage.
Also moved defirqaffinity.py to the base package to allow other profiles
to use it.

Resolves: rhbz#1359956

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
2016-10-07 11:56:57 +02:00

28 lines
781 B
Bash
Executable file

#!/bin/sh
. /usr/lib/tuned/functions
start() {
python /usr/libexec/tuned/defirqaffinity.py "remove" "$TUNED_isolated_cores_expanded" &&
tuna -c "$TUNED_isolated_cores_expanded" -i
sed -i '/^IRQBALANCE_BANNED_CPUS=/d' /etc/sysconfig/irqbalance
echo "IRQBALANCE_BANNED_CPUS=$TUNED_isolated_cpumask" >>/etc/sysconfig/irqbalance
return "$?"
}
stop() {
tuna -c "$TUNED_isolated_cores_expanded" -I &&
python /usr/libexec/tuned/defirqaffinity.py "add" "$TUNED_isolated_cores_expanded"
if [ "$1" = "profile_switch" ]
then
sed -i '/^IRQBALANCE_BANNED_CPUS=/d' /etc/sysconfig/irqbalance
fi
return "$?"
}
verify() {
python /usr/libexec/tuned/defirqaffinity.py "verify" "$TUNED_isolated_cores_expanded"
return "$?"
}
process $@