From 07d63a8fb0257d3541a2d6c13c985ef7ee3b03e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Fri, 17 Jun 2016 14:12:01 +0200 Subject: [PATCH] realtime: added assertion to check whether isolated_cores contains present CPUs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves: rhbz#1264128 Signed-off-by: Jaroslav Škarvada --- profiles/realtime-virtual-guest/tuned.conf | 4 ++++ profiles/realtime-virtual-host/tuned.conf | 4 ++++ profiles/realtime/tuned.conf | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/profiles/realtime-virtual-guest/tuned.conf b/profiles/realtime-virtual-guest/tuned.conf index 2304693..95dbfd6 100644 --- a/profiles/realtime-virtual-guest/tuned.conf +++ b/profiles/realtime-virtual-guest/tuned.conf @@ -10,6 +10,10 @@ include=realtime # User is responsible for adding isolated_cores=X-Y to realtime-virtual-guest-variables.conf include=/etc/tuned/realtime-virtual-guest-variables.conf 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:non present CPU(s) in isolated_cores:${isolated_cores_expanded}:${isolated_cores_present_expanded}} [script] script=script.sh diff --git a/profiles/realtime-virtual-host/tuned.conf b/profiles/realtime-virtual-host/tuned.conf index ac132c9..049f208 100644 --- a/profiles/realtime-virtual-host/tuned.conf +++ b/profiles/realtime-virtual-host/tuned.conf @@ -27,6 +27,10 @@ include=realtime # User is responsible for adding isolated_cores=X-Y to realtime-virtual-host-variables.conf include=/etc/tuned/realtime-virtual-host-variables.conf 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:non present CPU(s) in isolated_cores:${isolated_cores_expanded}:${isolated_cores_present_expanded}} [scheduler] # group.group_name=rule_priority:scheduler_policy:scheduler_priority:core_affinity_in_hex:process_name_regex diff --git a/profiles/realtime/tuned.conf b/profiles/realtime/tuned.conf index de1b54a..e81feaa 100644 --- a/profiles/realtime/tuned.conf +++ b/profiles/realtime/tuned.conf @@ -12,6 +12,11 @@ include = network-latency include = /etc/tuned/realtime-variables.conf # 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:non present CPU(s) in isolated_cores:${isolated_cores_expanded}:${isolated_cores_present_expanded}} [sysctl] kernel.hung_task_timeout_secs = 600