aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorGregory Haskins <ghaskins@novell.com>2008-05-12 15:21:01 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-06 09:19:28 -0400
commit6e0534f278199f1e3dd1049b9bc19a7a5b87ada1 (patch)
tree25f4da14ec32927742db9f599ac779b4e83d1763 /kernel/sched.c
parentf333fdc9098b71e2687e4e9b6349fcb352960d66 (diff)
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.c7
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 @@
74#include <asm/tlb.h> 74#include <asm/tlb.h>
75#include <asm/irq_regs.h> 75#include <asm/irq_regs.h>
76 76
77#include "sched_cpupri.h"
78
77/* 79/*
78 * Convert user-nice values [ -20 ... 0 ... 19 ] 80 * Convert user-nice values [ -20 ... 0 ... 19 ]
79 * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ], 81 * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ],
@@ -450,6 +452,9 @@ struct root_domain {
450 */ 452 */
451 cpumask_t rto_mask; 453 cpumask_t rto_mask;
452 atomic_t rto_count; 454 atomic_t rto_count;
455#ifdef CONFIG_SMP
456 struct cpupri cpupri;
457#endif
453}; 458};
454 459
455/* 460/*
@@ -6392,6 +6397,8 @@ static void init_rootdomain(struct root_domain *rd)
6392 6397
6393 cpus_clear(rd->span); 6398 cpus_clear(rd->span);
6394 cpus_clear(rd->online); 6399 cpus_clear(rd->online);
6400
6401 cpupri_init(&rd->cpupri);
6395} 6402}
6396 6403
6397static void init_defrootdomain(void) 6404static void init_defrootdomain(void)