Skip to contentSkip to conversation

sched: Introduce sched_feat_numa()

tip:sched/numa tip-bot for Peter Zijlstra 1 participant 1 message May 18, 2012 Scheduler

lore
Share & tools
lore
#0 lore raw
Commit-ID:  c143bcf78cabb3f2060473ac8527de8a81756313
Gitweb:     http://git.kernel.org/tip/c143bcf78cabb3f2060473ac8527de8a81756313
Author:     Peter Zijlstra <[email protected]>
AuthorDate: Tue, 1 May 2012 23:47:08 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 18 May 2012 08:16:22 +0200

sched: Introduce sched_feat_numa()

Avoid a few #ifdef's later on.

Cc Suresh Siddha <[email protected]>
Cc Paul Turner <[email protected]>
Cc Dan Smith <[email protected]>
Cc Bharata B Rao <[email protected]>
Cc Lee Schermerhorn <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Andrea Arcangeli <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Linus Torvalds <[email protected]>
---
 kernel/sched/sched.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
kernel/sched/sched.h +6 -0
index 8f93e91..0d6d1c0 100644
@@ -645,6 +645,12 @@ extern struct static_key sched_feat_keys[__SCHED_FEAT_NR];
 #define sched_feat(x) (sysctl_sched_features & (1UL << __SCHED_FEAT_##x))
 #endif /* SCHED_DEBUG && HAVE_JUMP_LABEL */
 
+#ifdef CONFIG_NUMA
+#define sched_feat_numa(x) sched_feat(x)
+#else
+#define sched_feat_numa(x) (0)
+#endif
+
 static inline u64 global_rt_period(void)
 {
 	return (u64)sysctl_sched_rt_period * NSEC_PER_USEC;