2012-10-25 13:11:06

by Peter Zijlstra

[permalink] [raw]
Subject: [PATCH 21/31] 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]>
Signed-off-by: Ingo Molnar <[email protected]>
---
kernel/sched/sched.h | 6 ++++++
1 file changed, 6 insertions(+)

Index: tip/kernel/sched/sched.h
===================================================================
--- tip.orig/kernel/sched/sched.h
+++ tip/kernel/sched/sched.h
@@ -648,6 +648,12 @@ extern struct static_key sched_feat_keys
#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;


2012-11-01 14:00:34

by Mel Gorman

[permalink] [raw]
Subject: Re: [PATCH 21/31] sched, numa, mm: Introduce sched_feat_numa()

On Thu, Oct 25, 2012 at 02:16:38PM +0200, Peter Zijlstra wrote:
> Avoid a few #ifdef's later on.
>

It does mean that schednuma cannot be enabled or disabled from the command
line (or similarly easy mechanism) and that debugfs must be mounted to
control it. This would be awkward from an admin perspective if they wanted
to force disable schednuma because it hurt their workload for whatever
reason. Yes, they can disable it with an init script of some sort but
there will be some moaning.

--
Mel Gorman
SUSE Labs