aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2012-11-23 06:23:49 -0500
committerMel Gorman <mgorman@suse.de>2012-12-11 09:42:56 -0500
commit3105b86a9fee7d2c2e76edb53bbbc4027599628f (patch)
treed9c3cfed4b98873d92dafadf2a8820fbbd71ae1c /kernel
parent1a687c2e9a99335c9e77392f050fe607fa18a652 (diff)
mm: sched: numa: Control enabling and disabling of NUMA balancing if !SCHED_DEBUG
The "mm: sched: numa: Control enabling and disabling of NUMA balancing" depends on scheduling debug being enabled but it's perfectly legimate to disable automatic NUMA balancing even without this option. This should take care of it. Signed-off-by: Mel Gorman <mgorman@suse.de>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core.c9
-rw-r--r--kernel/sched/sched.h8
2 files changed, 16 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 7a45015274ab..2a46f4407414 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -1558,6 +1558,7 @@ static void __sched_fork(struct task_struct *p)
1558} 1558}
1559 1559
1560#ifdef CONFIG_NUMA_BALANCING 1560#ifdef CONFIG_NUMA_BALANCING
1561#ifdef CONFIG_SCHED_DEBUG
1561void set_numabalancing_state(bool enabled) 1562void set_numabalancing_state(bool enabled)
1562{ 1563{
1563 if (enabled) 1564 if (enabled)
@@ -1565,6 +1566,14 @@ void set_numabalancing_state(bool enabled)
1565 else 1566 else
1566 sched_feat_set("NO_NUMA"); 1567 sched_feat_set("NO_NUMA");
1567} 1568}
1569#else
1570__read_mostly bool numabalancing_enabled;
1571
1572void set_numabalancing_state(bool enabled)
1573{
1574 numabalancing_enabled = enabled;
1575}
1576#endif /* CONFIG_SCHED_DEBUG */
1568#endif /* CONFIG_NUMA_BALANCING */ 1577#endif /* CONFIG_NUMA_BALANCING */
1569 1578
1570/* 1579/*
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index ae31c051ff2f..4f93d031875a 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -650,9 +650,15 @@ extern struct static_key sched_feat_keys[__SCHED_FEAT_NR];
650 650
651#ifdef CONFIG_NUMA_BALANCING 651#ifdef CONFIG_NUMA_BALANCING
652#define sched_feat_numa(x) sched_feat(x) 652#define sched_feat_numa(x) sched_feat(x)
653#ifdef CONFIG_SCHED_DEBUG
654#define numabalancing_enabled sched_feat_numa(NUMA)
655#else
656extern bool numabalancing_enabled;
657#endif /* CONFIG_SCHED_DEBUG */
653#else 658#else
654#define sched_feat_numa(x) (0) 659#define sched_feat_numa(x) (0)
655#endif 660#define numabalancing_enabled (0)
661#endif /* CONFIG_NUMA_BALANCING */
656 662
657static inline u64 global_rt_period(void) 663static inline u64 global_rt_period(void)
658{ 664{