|
|
1244d9 |
diff --git a/profiles/cpu-partitioning/tuned.conf b/profiles/cpu-partitioning/tuned.conf
|
|
|
1244d9 |
index 3c52215..1821b74 100644
|
|
|
1244d9 |
--- a/profiles/cpu-partitioning/tuned.conf
|
|
|
1244d9 |
+++ b/profiles/cpu-partitioning/tuned.conf
|
|
|
1244d9 |
@@ -19,13 +19,13 @@ tmpdir=${f:strip:${f:exec:/usr/bin/mktemp:-d}}
|
|
|
1244d9 |
isolated_cores_expanded=${f:cpulist_unpack:${isolated_cores}}
|
|
|
1244d9 |
isolated_cpumask=${f:cpulist2hex:${isolated_cores_expanded}}
|
|
|
1244d9 |
not_isolated_cores_expanded=${f:cpulist_invert:${isolated_cores_expanded}}
|
|
|
1244d9 |
-isolated_cores_present_expanded=${f:cpulist_present:${isolated_cores}}
|
|
|
1244d9 |
-not_isolated_cores_present_expanded=${f:cpulist_present:${not_isolated_cores_expanded}}
|
|
|
1244d9 |
+isolated_cores_online_expanded=${f:cpulist_online:${isolated_cores}}
|
|
|
1244d9 |
+not_isolated_cores_online_expanded=${f:cpulist_online:${not_isolated_cores_expanded}}
|
|
|
1244d9 |
not_isolated_cpumask=${f:cpulist2hex:${not_isolated_cores_expanded}}
|
|
|
1244d9 |
no_balance_cores_expanded=${f:cpulist_unpack:${no_balance_cores}}
|
|
|
1244d9 |
|
|
|
1244d9 |
-# Fail if isolated_cores contains CPUs which are not present
|
|
|
1244d9 |
-assert2=${f:assertion:isolated_cores contains present CPU(s):${isolated_cores_expanded}:${isolated_cores_present_expanded}}
|
|
|
1244d9 |
+# Fail if isolated_cores contains CPUs which are not online
|
|
|
1244d9 |
+assert2=${f:assertion:isolated_cores contains online CPU(s):${isolated_cores_expanded}:${isolated_cores_online_expanded}}
|
|
|
1244d9 |
|
|
|
1244d9 |
[sysctl]
|
|
|
1244d9 |
kernel.hung_task_timeout_secs = 600
|
|
|
1244d9 |
diff --git a/profiles/realtime-virtual-guest/tuned.conf b/profiles/realtime-virtual-guest/tuned.conf
|
|
|
8dde4c |
index b90e76f..fb2bc42 100644
|
|
|
1244d9 |
--- a/profiles/realtime-virtual-guest/tuned.conf
|
|
|
1244d9 |
+++ b/profiles/realtime-virtual-guest/tuned.conf
|
|
|
1244d9 |
@@ -15,10 +15,10 @@ isolated_cores_assert_check = \\${isolated_cores}
|
|
|
1244d9 |
assert1=${f:assertion_non_equal:isolated_cores are set:${isolated_cores}:${isolated_cores_assert_check}}
|
|
|
1244d9 |
|
|
|
1244d9 |
isolated_cores_expanded=${f:cpulist_unpack:${isolated_cores}}
|
|
|
1244d9 |
-isolated_cores_present_expanded=${f:cpulist_present:${isolated_cores}}
|
|
|
1244d9 |
+isolated_cores_online_expanded=${f:cpulist_online:${isolated_cores}}
|
|
|
1244d9 |
|
|
|
1244d9 |
-# Fail if isolated_cores contains CPUs which are not present
|
|
|
1244d9 |
-assert2=${f:assertion:isolated_cores contains present CPU(s):${isolated_cores_expanded}:${isolated_cores_present_expanded}}
|
|
|
1244d9 |
+# Fail if isolated_cores contains CPUs which are not online
|
|
|
1244d9 |
+assert2=${f:assertion:isolated_cores contains online CPU(s):${isolated_cores_expanded}:${isolated_cores_online_expanded}}
|
|
|
1244d9 |
|
|
|
1244d9 |
[scheduler]
|
|
|
1244d9 |
# group.group_name=rule_priority:scheduler_policy:scheduler_priority:core_affinity_in_hex:process_name_regex
|
|
|
1244d9 |
diff --git a/profiles/realtime-virtual-host/tuned.conf b/profiles/realtime-virtual-host/tuned.conf
|
|
|
8dde4c |
index 0346fff..5e0ff1f 100644
|
|
|
1244d9 |
--- a/profiles/realtime-virtual-host/tuned.conf
|
|
|
1244d9 |
+++ b/profiles/realtime-virtual-host/tuned.conf
|
|
|
8dde4c |
@@ -20,10 +20,10 @@ isolated_cores_assert_check = \\${isolated_cores}
|
|
|
1244d9 |
assert1=${f:assertion_non_equal:isolated_cores are set:${isolated_cores}:${isolated_cores_assert_check}}
|
|
|
1244d9 |
|
|
|
1244d9 |
isolated_cores_expanded=${f:cpulist_unpack:${isolated_cores}}
|
|
|
1244d9 |
-isolated_cores_present_expanded=${f:cpulist_present:${isolated_cores}}
|
|
|
1244d9 |
+isolated_cores_online_expanded=${f:cpulist_online:${isolated_cores}}
|
|
|
1244d9 |
|
|
|
1244d9 |
-# Fail if isolated_cores contains CPUs which are not present
|
|
|
1244d9 |
-assert2=${f:assertion:isolated_cores contains present CPU(s):${isolated_cores_expanded}:${isolated_cores_present_expanded}}
|
|
|
1244d9 |
+# Fail if isolated_cores contains CPUs which are not online
|
|
|
1244d9 |
+assert2=${f:assertion:isolated_cores contains online CPU(s):${isolated_cores_expanded}:${isolated_cores_online_expanded}}
|
|
|
1244d9 |
|
|
|
1244d9 |
[scheduler]
|
|
|
1244d9 |
# group.group_name=rule_priority:scheduler_policy:scheduler_priority:core_affinity_in_hex:process_name_regex
|
|
|
1244d9 |
diff --git a/profiles/realtime/tuned.conf b/profiles/realtime/tuned.conf
|
|
|
8dde4c |
index b2273cf..c595e67 100644
|
|
|
1244d9 |
--- a/profiles/realtime/tuned.conf
|
|
|
1244d9 |
+++ b/profiles/realtime/tuned.conf
|
|
|
1244d9 |
@@ -18,10 +18,10 @@ assert1=${f:assertion_non_equal:isolated_cores are set:${isolated_cores}:${isola
|
|
|
1244d9 |
# Non-isolated cores cpumask including offline cores
|
|
|
1244d9 |
not_isolated_cpumask = ${f:cpulist2hex_invert:${isolated_cores}}
|
|
|
1244d9 |
isolated_cores_expanded=${f:cpulist_unpack:${isolated_cores}}
|
|
|
1244d9 |
-isolated_cores_present_expanded=${f:cpulist_present:${isolated_cores}}
|
|
|
1244d9 |
+isolated_cores_online_expanded=${f:cpulist_online:${isolated_cores}}
|
|
|
1244d9 |
|
|
|
1244d9 |
-# Fail if isolated_cores contains CPUs which are not present
|
|
|
1244d9 |
-assert2=${f:assertion:isolated_cores contains present CPU(s):${isolated_cores_expanded}:${isolated_cores_present_expanded}}
|
|
|
1244d9 |
+# Fail if isolated_cores contains CPUs which are not online
|
|
|
1244d9 |
+assert2=${f:assertion:isolated_cores contains online CPU(s):${isolated_cores_expanded}:${isolated_cores_online_expanded}}
|
|
|
1244d9 |
|
|
|
1244d9 |
[sysctl]
|
|
|
1244d9 |
kernel.hung_task_timeout_secs = 600
|
|
|
1244d9 |
diff --git a/tuned/profiles/functions/function_cpulist_invert.py b/tuned/profiles/functions/function_cpulist_invert.py
|
|
|
8dde4c |
index 375eb67..2aff3c9 100644
|
|
|
1244d9 |
--- a/tuned/profiles/functions/function_cpulist_invert.py
|
|
|
1244d9 |
+++ b/tuned/profiles/functions/function_cpulist_invert.py
|
|
|
1244d9 |
@@ -8,7 +8,7 @@ log = tuned.logs.get()
|
|
|
1244d9 |
class cpulist_invert(base.Function):
|
|
|
1244d9 |
"""
|
|
|
1244d9 |
Inverts list of CPUs (makes its complement). For the complement it
|
|
|
1244d9 |
- gets number of present CPUs from the /sys/devices/system/cpu/present,
|
|
|
1244d9 |
+ gets number of present CPUs from the /sys/devices/system/cpu/online,
|
|
|
1244d9 |
e.g. system with 4 CPUs (0-3), the inversion of list "0,2,3" will be
|
|
|
1244d9 |
"1"
|
|
|
1244d9 |
"""
|
|
|
1244d9 |
diff --git a/tuned/utils/commands.py b/tuned/utils/commands.py
|
|
|
8dde4c |
index 8b7df57..41d6d99 100644
|
|
|
1244d9 |
--- a/tuned/utils/commands.py
|
|
|
1244d9 |
+++ b/tuned/utils/commands.py
|
|
|
8dde4c |
@@ -363,8 +363,8 @@ class commands:
|
|
|
1244d9 |
# Inverts CPU list (i.e. makes its complement)
|
|
|
1244d9 |
def cpulist_invert(self, l):
|
|
|
1244d9 |
cpus = self.cpulist_unpack(l)
|
|
|
1244d9 |
- present = self.cpulist_unpack(self.read_file("/sys/devices/system/cpu/present"))
|
|
|
1244d9 |
- return list(set(present) - set(cpus))
|
|
|
1244d9 |
+ online = self.cpulist_unpack(self.read_file("/sys/devices/system/cpu/online"))
|
|
|
1244d9 |
+ return list(set(online) - set(cpus))
|
|
|
1244d9 |
|
|
|
1244d9 |
# Converts CPU list to hexadecimal CPU mask
|
|
|
1244d9 |
def cpulist2hex(self, l):
|