Skip to content

Commit 5c4991e

Browse files
Frederic WeisbeckerIngo Molnar
authored andcommitted
sched/isolation: Split out new CONFIG_CPU_ISOLATION=y config from CONFIG_NO_HZ_FULL
Split the housekeeping config from CONFIG_NO_HZ_FULL. This way we finally separate the isolation code from NOHZ. Although a dependency to CONFIG_NO_HZ_FULL remains for now, while the housekeeping code still deals with NOHZ internals. 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-8-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 204c083 commit 5c4991e

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

include/linux/sched/isolation.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <linux/init.h>
66
#include <linux/tick.h>
77

8-
#ifdef CONFIG_NO_HZ_FULL
8+
#ifdef CONFIG_CPU_ISOLATION
99
DECLARE_STATIC_KEY_FALSE(housekeeping_overriden);
1010
extern int housekeeping_any_cpu(void);
1111
extern const struct cpumask *housekeeping_cpumask(void);
@@ -27,11 +27,11 @@ static inline const struct cpumask *housekeeping_cpumask(void)
2727

2828
static inline void housekeeping_affine(struct task_struct *t) { }
2929
static inline void housekeeping_init(void) { }
30-
#endif /* CONFIG_NO_HZ_FULL */
30+
#endif /* CONFIG_CPU_ISOLATION */
3131

3232
static inline bool housekeeping_cpu(int cpu)
3333
{
34-
#ifdef CONFIG_NO_HZ_FULL
34+
#ifdef CONFIG_CPU_ISOLATION
3535
if (static_branch_unlikely(&housekeeping_overriden))
3636
return housekeeping_test_cpu(cpu);
3737
#endif

init/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,14 @@ config TASK_IO_ACCOUNTING
472472

473473
endmenu # "CPU/Task time and stats accounting"
474474

475+
config CPU_ISOLATION
476+
bool "CPU isolation"
477+
depends on NO_HZ_FULL
478+
help
479+
Make sure that CPUs running critical tasks are not disturbed by
480+
any source of "noise" such as unbound workqueues, timers, kthreads...
481+
Unbound jobs get offloaded to housekeeping CPUs.
482+
475483
source "kernel/rcu/Kconfig"
476484

477485
config BUILD_BIN2C

kernel/sched/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ obj-$(CONFIG_CGROUP_CPUACCT) += cpuacct.o
2626
obj-$(CONFIG_CPU_FREQ) += cpufreq.o
2727
obj-$(CONFIG_CPU_FREQ_GOV_SCHEDUTIL) += cpufreq_schedutil.o
2828
obj-$(CONFIG_MEMBARRIER) += membarrier.o
29-
obj-$(CONFIG_NO_HZ_FULL) += isolation.o
29+
obj-$(CONFIG_CPU_ISOLATION) += isolation.o

0 commit comments

Comments
 (0)