Plugin scheduler now can do cores isolation on its own, Tuna is not needed for it, e.g.: [scheduler] isolated_cores=2-4 ps_blacklist=.*pmd.*;.*PMD.*;^DPDK;.*qemu-kvm.* It will isolate cores 2-4, it will ignore processes which matched ps_blacklist regexes. Multiple regexes can be separated by ';'. Quoted semicolon, i.e. '\;' is taken literally. It also supports 'ps_whitelist' which is by default set to '.*'. It takes all processes which matches ps_whitelist than it removes those which matches ps_blacklist and move them out of the isolated_cores. When the profile is unloaded it allows all matching processes to run on all cores. It changes processes affinities, threads affinities, IRQs affinities and it sets default_smp_affinity for IRQs. Also cpu-partitioning profile has been switched from Tuna to this mechanism. Resolves: rhbz#1403309 Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
32 lines
992 B
Bash
Executable file
32 lines
992 B
Bash
Executable file
#!/bin/sh
|
|
|
|
. /usr/lib/tuned/functions
|
|
|
|
start() {
|
|
mkdir -p "${TUNED_tmpdir}/etc/systemd"
|
|
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
|
|
return "$?"
|
|
}
|
|
|
|
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
|
|
teardown_kvm_mod_low_latency
|
|
fi
|
|
return "$?"
|
|
}
|
|
|
|
verify() {
|
|
python /usr/libexec/tuned/defirqaffinity.py "verify" "$TUNED_isolated_cores_expanded"
|
|
return "$?"
|
|
}
|
|
|
|
process $@
|