summaryrefslogtreecommitdiff
path: root/include/linux/sched/isolation.h
diff options
context:
space:
mode:
authorFrederic Weisbecker <frederic@kernel.org>2017-10-27 05:42:32 +0300
committerIngo Molnar <mingo@kernel.org>2017-10-27 10:55:27 +0300
commite179f5a04ba46ee5c5439480c2bfd68c358168b7 (patch)
treebe51371dfbe99861087f3a911b66f7dc8c7e9d6e /include/linux/sched/isolation.h
parent7e56a1cf4b28f5739526877b8dbad623fae2e4e7 (diff)
downloadlinux-e179f5a04ba46ee5c5439480c2bfd68c358168b7.tar.xz
sched/isolation: Use its own static key
Housekeeping code still depends on the nohz_full static key. Since we want to decouple housekeeping from NOHZ, let's create a housekeeping specific static key. It's mostly relevant for calls to is_housekeeping_cpu() from the scheduler. 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-6-git-send-email-frederic@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/sched/isolation.h')
-rw-r--r--include/linux/sched/isolation.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/sched/isolation.h b/include/linux/sched/isolation.h
index ed935ffc6ffa..194c586fbb12 100644
--- a/include/linux/sched/isolation.h
+++ b/include/linux/sched/isolation.h
@@ -6,6 +6,7 @@
#include <linux/tick.h>
#ifdef CONFIG_NO_HZ_FULL
+DECLARE_STATIC_KEY_FALSE(housekeeping_overriden);
extern int housekeeping_any_cpu(void);
extern const struct cpumask *housekeeping_cpumask(void);
extern void housekeeping_affine(struct task_struct *t);
@@ -31,7 +32,7 @@ static inline void housekeeping_init(void) { }
static inline bool is_housekeeping_cpu(int cpu)
{
#ifdef CONFIG_NO_HZ_FULL
- if (tick_nohz_full_enabled())
+ if (static_branch_unlikely(&housekeeping_overriden))
return housekeeping_test_cpu(cpu);
#endif
return true;