diff options
author | Frederic Weisbecker <frederic@kernel.org> | 2017-10-26 22:42:37 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-10-27 03:55:30 -0400 |
commit | edb9382175c3ebdced8ffdb3e0f20052ad9fdbe9 (patch) | |
tree | 5257baafe1ada153e8eb0bfe41e02c8f0545e6fa /drivers/base/cpu.c | |
parent | 6f1982fedd59856bcc42a9b521be4c3ffd2f60a7 (diff) |
sched/isolation: Move isolcpus= handling to the housekeeping code
We want to centralize the isolation features, to be done by the housekeeping
subsystem and scheduler domain isolation is a significant part of it.
No intended behaviour change, we just reuse the housekeeping cpumask
and core code.
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Wanpeng Li <kernellwp@gmail.com>
Link: http://lkml.kernel.org/r/1509072159-31808-11-git-send-email-frederic@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/base/cpu.c')
-rw-r--r-- | drivers/base/cpu.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 321cd7b4d817..a73ab95558f5 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/cpufeature.h> | 18 | #include <linux/cpufeature.h> |
19 | #include <linux/tick.h> | 19 | #include <linux/tick.h> |
20 | #include <linux/pm_qos.h> | 20 | #include <linux/pm_qos.h> |
21 | #include <linux/sched/isolation.h> | ||
21 | 22 | ||
22 | #include "base.h" | 23 | #include "base.h" |
23 | 24 | ||
@@ -271,8 +272,16 @@ static ssize_t print_cpus_isolated(struct device *dev, | |||
271 | struct device_attribute *attr, char *buf) | 272 | struct device_attribute *attr, char *buf) |
272 | { | 273 | { |
273 | int n = 0, len = PAGE_SIZE-2; | 274 | int n = 0, len = PAGE_SIZE-2; |
275 | cpumask_var_t isolated; | ||
274 | 276 | ||
275 | n = scnprintf(buf, len, "%*pbl\n", cpumask_pr_args(cpu_isolated_map)); | 277 | if (!alloc_cpumask_var(&isolated, GFP_KERNEL)) |
278 | return -ENOMEM; | ||
279 | |||
280 | cpumask_andnot(isolated, cpu_possible_mask, | ||
281 | housekeeping_cpumask(HK_FLAG_DOMAIN)); | ||
282 | n = scnprintf(buf, len, "%*pbl\n", cpumask_pr_args(isolated)); | ||
283 | |||
284 | free_cpumask_var(isolated); | ||
276 | 285 | ||
277 | return n; | 286 | return n; |
278 | } | 287 | } |