diff options
author | Siddha, Suresh B <suresh.b.siddha@intel.com> | 2007-05-08 03:32:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:17 -0400 |
commit | 46cb4b7c88fa5517f64b5bee42939ea3614cddcb (patch) | |
tree | 429b8092394974ae787bf0cfaefe5c7b6a1da782 /include/linux/sched.h | |
parent | bdecea3a9282d529b54954f3f1e59877629baba1 (diff) |
sched: dynticks idle load balancing
Fix the process idle load balancing in the presence of dynticks. cpus for
which ticks are stopped will sleep till the next event wakes it up.
Potentially these sleeps can be for large durations and during which today,
there is no periodic idle load balancing being done.
This patch nominates an owner among the idle cpus, which does the idle load
balancing on behalf of the other idle cpus. And once all the cpus are
completely idle, then we can stop this idle load balancing too. Checks added
in fast path are minimized. Whenever there are busy cpus in the system, there
will be an owner(idle cpu) doing the system wide idle load balancing.
Open items:
1. Intelligent owner selection (like an idle core in a busy package).
2. Merge with rcu's nohz_cpu_mask?
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 6312521df2c1..15ab3e039535 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -194,6 +194,14 @@ extern void sched_init_smp(void); | |||
194 | extern void init_idle(struct task_struct *idle, int cpu); | 194 | extern void init_idle(struct task_struct *idle, int cpu); |
195 | 195 | ||
196 | extern cpumask_t nohz_cpu_mask; | 196 | extern cpumask_t nohz_cpu_mask; |
197 | #if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ) | ||
198 | extern int select_nohz_load_balancer(int cpu); | ||
199 | #else | ||
200 | static inline int select_nohz_load_balancer(int cpu) | ||
201 | { | ||
202 | return 0; | ||
203 | } | ||
204 | #endif | ||
197 | 205 | ||
198 | /* | 206 | /* |
199 | * Only dump TASK_* tasks. (0 for all tasks) | 207 | * Only dump TASK_* tasks. (0 for all tasks) |