2012-10-28 17:05:53

by Peter Zijlstra

[permalink] [raw]
Subject: [tip:numa/core] sched, numa, mm: Introduce sched_feat_numa()

Commit-ID: 6e27d9318a551b14a6ef8a1956b497f1477680a1
Gitweb: http://git.kernel.org/tip/6e27d9318a551b14a6ef8a1956b497f1477680a1
Author: Peter Zijlstra <[email protected]>
AuthorDate: Tue, 1 May 2012 23:47:08 +0200
Committer: Ingo Molnar <[email protected]>
CommitDate: Sun, 28 Oct 2012 17:31:10 +0100

sched, numa, mm: Introduce sched_feat_numa()

Avoid a few #ifdef's later on.

Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Paul Turner <[email protected]>
Cc: Lee Schermerhorn <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
---
kernel/sched/sched.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 7a7db09..741272e 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -648,6 +648,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_SCHED_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;