[PATCH] sched: implement nice support across physical cpus on SMP
authorCon Kolivas <kernel@kolivas.org>
Wed, 9 Nov 2005 05:38:55 +0000 (21:38 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 9 Nov 2005 15:56:32 +0000 (07:56 -0800)
commitb910472dd3b7c1d51af9a594a759f642520c33e1
treecf2f0496b671bf8728f16b009c84e8811afbcae3
parentb54134be53be720da423692665ec215eb14a678b
[PATCH] sched: implement nice support across physical cpus on SMP

This patch implements 'nice' support across physical cpus on SMP.

It introduces an extra runqueue variable prio_bias which is the sum of the
(inverted) static priorities of all the tasks on the runqueue.

This is then used to bias busy rebalancing between runqueues to obtain good
distribution of tasks of different nice values.  By biasing the balancing only
during busy rebalancing we can avoid having any significant loss of throughput
by not affecting the carefully tuned idle balancing already in place.  If all
tasks are running at the same nice level this code should also have minimal
effect.  The code is optimised out in the !CONFIG_SMP case.

Signed-off-by: Con Kolivas <kernel@kolivas.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sched.c