sched/rt: Migrate equal priority tasks to available CPUs
authorShawn Bohrer <sbohrer@rgmadvisors.com>
Mon, 12 Sep 2011 14:28:04 +0000 (09:28 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 16 Oct 2011 21:14:51 +0000 (14:14 -0700)
commit113f8b8f997cd3a70e6e4c95ced9232d50b7a308
treeb538a6784088c3a84cef45aec6952f392d83c2b3
parentca64baea4dd045516046a84a8860c3f9809b8984
sched/rt: Migrate equal priority tasks to available CPUs

commit 3be209a8e22cedafc1b6945608b7bb8d9887ab61 upstream.

Commit 43fa5460fe60dea5c610490a1d263415419c60f6 ("sched: Try not to
migrate higher priority RT tasks") also introduced a change in behavior
which keeps RT tasks on the same CPU if there is an equal priority RT
task currently running even if there are empty CPUs available.

This can cause unnecessary wakeup latencies, and can prevent the
scheduler from balancing all RT tasks across available CPUs.

This change causes an RT task to search for a new CPU if an equal
priority RT task is already running on wakeup.  Lower priority tasks
will still have to wait on higher priority tasks, but the system should
still balance out because there is always the possibility that if there
are both a high and low priority RT tasks on a given CPU that the high
priority task could wakeup while the low priority task is running and
force it to search for a better runqueue.

Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Tested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1315837684-18733-1-git-send-email-sbohrer@rgmadvisors.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/sched_rt.c