diff --git a/profiles/realtime/tuned.conf b/profiles/realtime/tuned.conf index e1b6bcd..2592681 100644 --- a/profiles/realtime/tuned.conf +++ b/profiles/realtime/tuned.conf @@ -10,13 +10,17 @@ include = network-latency [variables] # User is responsible for updating variables.conf with variable content such as isolated_cores=X-Y include = /etc/tuned/realtime-variables.conf + +# Fail if isolated_cores are not set +assert1=${f:assertion_non_equal:isolated_cores unset:${isolated_cores}:\${isolated_cores}} + # Non-isolated cores cpumask including offline cores not_isolated_cpumask = ${f:cpulist2hex_invert:${isolated_cores}} isolated_cores_expanded=${f:cpulist_unpack:${isolated_cores}} isolated_cores_present_expanded=${f:cpulist_present:${isolated_cores}} # Fail if isolated_cores contains CPUs which are not present -assert=${f:assertion:isolated_cores contains present CPU(s):${isolated_cores_expanded}:${isolated_cores_present_expanded}} +assert2=${f:assertion:isolated_cores contains present CPU(s):${isolated_cores_expanded}:${isolated_cores_present_expanded}} [sysctl] kernel.hung_task_timeout_secs = 600 diff --git a/tuned/profiles/functions/function_assertion_non_equal.py b/tuned/profiles/functions/function_assertion_non_equal.py index f247163..a678bf2 100644 --- a/tuned/profiles/functions/function_assertion_non_equal.py +++ b/tuned/profiles/functions/function_assertion_non_equal.py @@ -20,6 +20,6 @@ class assertion_non_equal(base.Function): if not super(self.__class__, self).execute(args): return None if args[1] != args[2]: - log.error("assertion non equal '%s' failed: '%s' == '%s'" % (args[0], args[1], args[2])) - raise InvalidProfileException("Assertion non equal '%s' failed." % args[0]) + log.error("assertion '%s' failed: '%s' == '%s'" % (args[0], args[1], args[2])) + raise InvalidProfileException("Assertion '%s' failed." % args[0]) return None