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: Ondřej Lysoněk <olysonek@redhat.com>
This commit is contained in:
parent
66b247a7e9
commit
c2dfc1f806
7 changed files with 8 additions and 46 deletions
|
|
@ -39,7 +39,6 @@ start() {
|
||||||
mkdir -p "${TUNED_tmpdir}/usr/lib/dracut/hooks/pre-udev"
|
mkdir -p "${TUNED_tmpdir}/usr/lib/dracut/hooks/pre-udev"
|
||||||
cp /etc/systemd/system.conf "${TUNED_tmpdir}/etc/systemd/"
|
cp /etc/systemd/system.conf "${TUNED_tmpdir}/etc/systemd/"
|
||||||
cp 00-tuned-pre-udev.sh "${TUNED_tmpdir}/usr/lib/dracut/hooks/pre-udev/"
|
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
|
sed -i '/^IRQBALANCE_BANNED_CPUS=/d' /etc/sysconfig/irqbalance
|
||||||
echo "IRQBALANCE_BANNED_CPUS=$TUNED_isolated_cpumask" >>/etc/sysconfig/irqbalance
|
echo "IRQBALANCE_BANNED_CPUS=$TUNED_isolated_cpumask" >>/etc/sysconfig/irqbalance
|
||||||
setup_kvm_mod_low_latency
|
setup_kvm_mod_low_latency
|
||||||
|
|
@ -51,7 +50,6 @@ start() {
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
python /usr/libexec/tuned/defirqaffinity.py "add" "$TUNED_isolated_cores_expanded"
|
|
||||||
if [ "$1" = "full_rollback" ]
|
if [ "$1" = "full_rollback" ]
|
||||||
then
|
then
|
||||||
sed -i '/^IRQBALANCE_BANNED_CPUS=/d' /etc/sysconfig/irqbalance
|
sed -i '/^IRQBALANCE_BANNED_CPUS=/d' /etc/sysconfig/irqbalance
|
||||||
|
|
@ -62,9 +60,4 @@ stop() {
|
||||||
return "$?"
|
return "$?"
|
||||||
}
|
}
|
||||||
|
|
||||||
verify() {
|
|
||||||
python /usr/libexec/tuned/defirqaffinity.py "verify" "$TUNED_isolated_cores_expanded"
|
|
||||||
return "$?"
|
|
||||||
}
|
|
||||||
|
|
||||||
process $@
|
process $@
|
||||||
|
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
#!/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
|
# for i in `pgrep ktimersoftd` ; do grep Cpus_allowed_list /proc/$i/status ; done
|
||||||
group.ktimersoftd=0:f:3:*:ktimersoftd.*
|
group.ktimersoftd=0:f:3:*:ktimersoftd.*
|
||||||
|
|
||||||
[script]
|
ps_blacklist=ksoftirqd.*;rcuc.*;rcub.*;ktimersoftd.*
|
||||||
script=${i:PROFILE_DIR}/script.sh
|
|
||||||
|
|
||||||
[bootloader]
|
[bootloader]
|
||||||
cmdline_rvg=+nohz=on nohz_full=${isolated_cores} rcu_nocbs=${isolated_cores}
|
cmdline_rvg=+nohz=on nohz_full=${isolated_cores} rcu_nocbs=${isolated_cores}
|
||||||
|
|
|
||||||
|
|
@ -44,10 +44,6 @@ run_tsc_deadline_latency()
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
if ! /usr/libexec/tuned/defirqaffinity.py "remove" "$TUNED_isolated_cores_expanded"; then
|
|
||||||
die defirqaffinity.py remove failed
|
|
||||||
fi
|
|
||||||
|
|
||||||
setup_kvm_mod_low_latency
|
setup_kvm_mod_low_latency
|
||||||
|
|
||||||
disable_ksm
|
disable_ksm
|
||||||
|
|
@ -97,15 +93,12 @@ start() {
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
[ "$1" = "full_rollback" ] && teardown_kvm_mod_low_latency
|
[ "$1" = "full_rollback" ] && teardown_kvm_mod_low_latency
|
||||||
python /usr/libexec/tuned/defirqaffinity.py "add" "$TUNED_isolated_cores_expanded"
|
|
||||||
enable_ksm
|
enable_ksm
|
||||||
return "$?"
|
return "$?"
|
||||||
}
|
}
|
||||||
|
|
||||||
verify() {
|
verify() {
|
||||||
python /usr/libexec/tuned/defirqaffinity.py "verify" "$TUNED_isolated_cores_expanded"
|
if [ -f /sys/module/kvm/parameters/kvmclock_periodic_sync ]; then
|
||||||
retval=$?
|
|
||||||
if [ $retval -eq 0 -a -f /sys/module/kvm/parameters/kvmclock_periodic_sync ]; then
|
|
||||||
test "$(cat /sys/module/kvm/parameters/kvmclock_periodic_sync)" = 0
|
test "$(cat /sys/module/kvm/parameters/kvmclock_periodic_sync)" = 0
|
||||||
retval=$?
|
retval=$?
|
||||||
fi
|
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
|
# for i in `pgrep ktimersoftd` ; do grep Cpus_allowed_list /proc/$i/status ; done
|
||||||
group.ktimersoftd=0:f:3:*:ktimersoftd.*
|
group.ktimersoftd=0:f:3:*:ktimersoftd.*
|
||||||
|
|
||||||
|
ps_blacklist=ksoftirqd.*;rcuc.*;rcub.*;ktimersoftd.*
|
||||||
|
|
||||||
[script]
|
[script]
|
||||||
script=${i:PROFILE_DIR}/script.sh
|
script=${i:PROFILE_DIR}/script.sh
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,15 +3,7 @@
|
||||||
. /usr/lib/tuned/functions
|
. /usr/lib/tuned/functions
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
if [ -z "$TUNED_isolated_cores" ]; then
|
return 0
|
||||||
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 "$?"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
|
|
|
||||||
|
|
@ -40,3 +40,6 @@ cmdline_realtime=+isolcpus=${isolated_cores} intel_pstate=disable nosoftlockup
|
||||||
|
|
||||||
[script]
|
[script]
|
||||||
script = ${i:PROFILE_DIR}/script.sh
|
script = ${i:PROFILE_DIR}/script.sh
|
||||||
|
|
||||||
|
[scheduler]
|
||||||
|
isolated_cores=${isolated_cores}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue