Commit c2dfc1f8 authored by Ondřej Lysoněk's avatar Ondřej Lysoněk

profiles: Replace calls to defirqaffinity.py

In the cpu-partitioning profile, IRQ affinity change is already done
as part of the 'isolated_cores' option of the scheduler plugin, so
calling defirqaffinity is, at best, redundant. So let's remove the call.

In the realtime* profiles, it's essentially the same, except that tuna
was used instead of isolated_cores. So let's use built-in functionality
instead of tuna and drop calls to defirqaffinity.

Resolves: rhbz#1590937
Signed-off-by: default avatarOndřej Lysoněk <olysonek@redhat.com>
parent 66b247a7
......@@ -39,7 +39,6 @@ start() {
mkdir -p "${TUNED_tmpdir}/usr/lib/dracut/hooks/pre-udev"
cp /etc/systemd/system.conf "${TUNED_tmpdir}/etc/systemd/"
cp 00-tuned-pre-udev.sh "${TUNED_tmpdir}/usr/lib/dracut/hooks/pre-udev/"
python /usr/libexec/tuned/defirqaffinity.py "remove" "$TUNED_isolated_cores_expanded"
sed -i '/^IRQBALANCE_BANNED_CPUS=/d' /etc/sysconfig/irqbalance
echo "IRQBALANCE_BANNED_CPUS=$TUNED_isolated_cpumask" >>/etc/sysconfig/irqbalance
setup_kvm_mod_low_latency
......@@ -51,7 +50,6 @@ start() {
}
stop() {
python /usr/libexec/tuned/defirqaffinity.py "add" "$TUNED_isolated_cores_expanded"
if [ "$1" = "full_rollback" ]
then
sed -i '/^IRQBALANCE_BANNED_CPUS=/d' /etc/sysconfig/irqbalance
......@@ -62,9 +60,4 @@ stop() {
return "$?"
}
verify() {
python /usr/libexec/tuned/defirqaffinity.py "verify" "$TUNED_isolated_cores_expanded"
return "$?"
}
process $@
#!/bin/sh
. /usr/lib/tuned/functions
start() {
python /usr/libexec/tuned/defirqaffinity.py "remove" "$TUNED_isolated_cores_expanded" &&
return "$?"
}
stop() {
python /usr/libexec/tuned/defirqaffinity.py "add" "$TUNED_isolated_cores_expanded"
return "$?"
}
verify() {
python /usr/libexec/tuned/defirqaffinity.py "verify" "$TUNED_isolated_cores_expanded"
return "$?"
}
process $@
......@@ -34,8 +34,7 @@ group.rcub=0:f:4:*:rcub.*
# for i in `pgrep ktimersoftd` ; do grep Cpus_allowed_list /proc/$i/status ; done
group.ktimersoftd=0:f:3:*:ktimersoftd.*
[script]
script=${i:PROFILE_DIR}/script.sh
ps_blacklist=ksoftirqd.*;rcuc.*;rcub.*;ktimersoftd.*
[bootloader]
cmdline_rvg=+nohz=on nohz_full=${isolated_cores} rcu_nocbs=${isolated_cores}
......@@ -44,10 +44,6 @@ run_tsc_deadline_latency()
}
start() {
if ! /usr/libexec/tuned/defirqaffinity.py "remove" "$TUNED_isolated_cores_expanded"; then
die defirqaffinity.py remove failed
fi
setup_kvm_mod_low_latency
disable_ksm
......@@ -97,15 +93,12 @@ start() {
stop() {
[ "$1" = "full_rollback" ] && teardown_kvm_mod_low_latency
python /usr/libexec/tuned/defirqaffinity.py "add" "$TUNED_isolated_cores_expanded"
enable_ksm
return "$?"
}
verify() {
python /usr/libexec/tuned/defirqaffinity.py "verify" "$TUNED_isolated_cores_expanded"
retval=$?
if [ $retval -eq 0 -a -f /sys/module/kvm/parameters/kvmclock_periodic_sync ]; then
if [ -f /sys/module/kvm/parameters/kvmclock_periodic_sync ]; then
test "$(cat /sys/module/kvm/parameters/kvmclock_periodic_sync)" = 0
retval=$?
fi
......
......@@ -39,6 +39,8 @@ group.rcub=0:f:4:*:rcub.*
# for i in `pgrep ktimersoftd` ; do grep Cpus_allowed_list /proc/$i/status ; done
group.ktimersoftd=0:f:3:*:ktimersoftd.*
ps_blacklist=ksoftirqd.*;rcuc.*;rcub.*;ktimersoftd.*
[script]
script=${i:PROFILE_DIR}/script.sh
......
......@@ -3,15 +3,7 @@
. /usr/lib/tuned/functions
start() {
if [ -z "$TUNED_isolated_cores" ]; then
echo "no isolated cores set, realtime profile not correctly activated" >&2
exit 1
fi
# move threads off the selected cpu cores
tuna -c "$TUNED_isolated_cores" -i
return "$?"
return 0
}
stop() {
......
......@@ -40,3 +40,6 @@ cmdline_realtime=+isolcpus=${isolated_cores} intel_pstate=disable nosoftlockup
[script]
script = ${i:PROFILE_DIR}/script.sh
[scheduler]
isolated_cores=${isolated_cores}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment