Skip to content

Commit

Permalink
cpu-partitioning: used tuned instead of tuna for cores isolation
Browse files Browse the repository at this point in the history
Resolves: rhbz#1442229

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
  • Loading branch information
yarda committed Apr 28, 2017
1 parent cbaceef commit af56ac3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 0 additions & 2 deletions profiles/cpu-partitioning/script.sh
Expand Up @@ -8,15 +8,13 @@ start() {
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" &&
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
setup_kvm_mod_low_latency
return "$?"
}

stop() {
tuna -c "$TUNED_isolated_cores_expanded" -I &&
python /usr/libexec/tuned/defirqaffinity.py "add" "$TUNED_isolated_cores_expanded"
if [ "$1" = "full_rollback" ]
then
Expand Down
12 changes: 3 additions & 9 deletions profiles/cpu-partitioning/tuned.conf
Expand Up @@ -44,15 +44,9 @@ cpu_affinity=${not_isolated_cores_expanded}
priority=5
script=${i:PROFILE_DIR}/script.sh

# For cores isolation 'tuna' is used by default, but it cannot blacklist
# processes. If you need process blacklisting (i.e. marking of processes
# which can run on isolated cores) you can use 'scheduler' plugin for it
# This is new feature, thus not enabled by default. You can enable it by
# uncommenting the scheduler and its parameters bellow. In such case also
# remove the two lines containing 'tuna' from from the script.sh.
#[scheduler]
#isolated_cores=${isolated_cores}
#ps_blacklist=.*pmd.*;.*PMD.*;^DPDK;.*qemu-kvm.*
[scheduler]
isolated_cores=${isolated_cores}
ps_blacklist=.*pmd.*;.*PMD.*;^DPDK;.*qemu-kvm.*

[bootloader]
priority=10
Expand Down
1 change: 0 additions & 1 deletion tuned.spec
Expand Up @@ -136,7 +136,6 @@ Additional tuned profile(s) targeted to Network Function Virtualization (NFV).
%package profiles-cpu-partitioning
Summary: Additional tuned profile(s) optimized for CPU partitioning
Requires: %{name} = %{version}
Requires: tuna

%description profiles-cpu-partitioning
Additional tuned profile(s) optimized for CPU partitioning.
Expand Down

0 comments on commit af56ac3

Please sign in to comment.