]> git.baikalelectronics.ru Git - kernel.git/commit
sched: fix SCHED_FAIR wake-idle logic error
authorGregory Haskins <ghaskins@novell.com>
Mon, 28 Apr 2008 16:40:01 +0000 (12:40 -0400)
committerIngo Molnar <mingo@elte.hu>
Mon, 5 May 2008 21:56:18 +0000 (23:56 +0200)
commit908f35ea48db396abe35d10682d7e46ddcdcb7d9
treed63d707ee5b9d1dbc8e5796e142ca584736f01b9
parent1c4938f16a174bafde7fb76c3c74abe92049bd22
sched: fix SCHED_FAIR wake-idle logic error

We currently use an optimization to skip the overhead of wake-idle
processing if more than one task is assigned to a run-queue.  The
assumption is that the system must already be load-balanced or we
wouldnt be overloaded to begin with.

The problem is that we are looking at rq->nr_running, which may include
RT tasks in addition to CFS tasks.  Since the presence of RT tasks
really has no bearing on the balance status of CFS tasks, this throws
the calculation off.

This patch changes the logic to only consider the number of CFS tasks
when making the decision to optimze the wake-idle.

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
CC: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_fair.c