diff options
author | Gregory Haskins <ghaskins@novell.com> | 2008-05-12 21:21:01 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-06 15:19:28 +0200 |
commit | 6e0534f278199f1e3dd1049b9bc19a7a5b87ada1 (patch) | |
tree | 25f4da14ec32927742db9f599ac779b4e83d1763 /kernel/sched.c | |
parent | f333fdc9098b71e2687e4e9b6349fcb352960d66 (diff) | |
download | lwn-6e0534f278199f1e3dd1049b9bc19a7a5b87ada1.tar.gz lwn-6e0534f278199f1e3dd1049b9bc19a7a5b87ada1.zip |
sched: use a 2-d bitmap for searching lowest-pri CPU
The current code use a linear algorithm which causes scaling issues
on larger SMP machines. This patch replaces that algorithm with a
2-dimensional bitmap to reduce latencies in the wake-up path.
Signed-off-by: Gregory Haskins <ghaskins@novell.com>
Acked-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index aa960b84b881..8a1257b65560 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -74,6 +74,8 @@ #include <asm/tlb.h> #include <asm/irq_regs.h> +#include "sched_cpupri.h" + /* * Convert user-nice values [ -20 ... 0 ... 19 ] * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ], @@ -450,6 +452,9 @@ struct root_domain { */ cpumask_t rto_mask; atomic_t rto_count; +#ifdef CONFIG_SMP + struct cpupri cpupri; +#endif }; /* @@ -6392,6 +6397,8 @@ static void init_rootdomain(struct root_domain *rd) cpus_clear(rd->span); cpus_clear(rd->online); + + cpupri_init(&rd->cpupri); } static void init_defrootdomain(void) |