aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorGregory Haskins <ghaskins@novell.com>2008-01-25 15:08:18 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-25 15:08:18 -0500
commit637f50851b57a32f7ec67c50fc16f1601ab1a87a (patch)
treeee8a4bc19fda1783bff8aa44abdcb6d8596aa7f1 /kernel/sched.c
parent57d885fea0da0e9541d7730a9e1dcf734981a173 (diff)
sched: only balance our RT tasks within our domain
We move the rt-overload data as the first global to per-domain reclassification. This limits the scope of overload related cache-line bouncing to stay with a specified partition instead of affecting all cpus in the system. Finally, we limit the scope of find_lowest_cpu searches to the domain instead of the entire system. Note that we would always respect domain boundaries even without this patch, but we first would scan potentially all cpus before whittling the list down. Now we can avoid looking at RQs that are out of scope, again reducing cache-line hits. Note: In some cases, task->cpus_allowed will effectively reduce our search to within our domain. However, I believe there are cases where the cpus_allowed mask may be all ones and therefore we err on the side of caution. If it can be optimized later, so be it. Signed-off-by: Gregory Haskins <ghaskins@novell.com> CC: Christoph Lameter <clameter@sgi.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 34b7d721d735..35ef06c99214 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -365,6 +365,13 @@ struct root_domain {
365 atomic_t refcount; 365 atomic_t refcount;
366 cpumask_t span; 366 cpumask_t span;
367 cpumask_t online; 367 cpumask_t online;
368
369 /*
370 * The "RT overload" flag: it gets set if a CPU has more than
371 * one runnable RT task.
372 */
373 cpumask_t rto_mask;
374 atomic_t rto_count;
368}; 375};
369 376
370static struct root_domain def_root_domain; 377static struct root_domain def_root_domain;