Blame SOURCES/tuned-2.9.0-use-online-cpus.patch

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