sched: make double-lock-balance fair
authorGregory Haskins <ghaskins@novell.com>
Mon, 29 Dec 2008 14:39:51 +0000 (09:39 -0500)
committerGregory Haskins <ghaskins@novell.com>
Mon, 29 Dec 2008 14:39:51 +0000 (09:39 -0500)
commit8f45e2b516201d1bf681e6026fa5276385def565
treeb50d5cc2d6932d1f33f222bdf6052cfa32cddc8c
parent7e96fa5875d4a9be18d74d3ca7b90518d05bc426
sched: make double-lock-balance fair

double_lock balance() currently favors logically lower cpus since they
often do not have to release their own lock to acquire a second lock.
The result is that logically higher cpus can get starved when there is
a lot of pressure on the RQs.  This can result in higher latencies on
higher cpu-ids.

This patch makes the algorithm more fair by forcing all paths to have
to release both locks before acquiring them again.  Since callsites to
double_lock_balance already consider it a potential preemption/reschedule
point, they have the proper logic to recheck for atomicity violations.

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
kernel/sched.c
This page took 0.033125 seconds and 5 git commands to generate.