[PATCH] sched: include noninteractive sleep in idle detect
authorCon Kolivas <kernel@kolivas.org>
Fri, 31 Mar 2006 10:31:27 +0000 (02:31 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 31 Mar 2006 20:18:59 +0000 (12:18 -0800)
Tasks waiting in SLEEP_NONINTERACTIVE state can now get to best priority so
they need to be included in the idle detection code.

Signed-off-by: Con Kolivas <kernel@kolivas.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sched.c

index 7b37193..3055fe8 100644 (file)
@@ -705,8 +705,7 @@ static int recalc_task_prio(task_t *p, unsigned long long now)
                 * active yet prevent them suddenly becoming cpu hogs and
                 * starving other processes.
                 */
-               if (p->mm && p->sleep_type != SLEEP_NONINTERACTIVE &&
-                       sleep_time > INTERACTIVE_SLEEP(p)) {
+               if (p->mm && sleep_time > INTERACTIVE_SLEEP(p)) {
                                unsigned long ceiling;
 
                                ceiling = JIFFIES_TO_NS(MAX_SLEEP_AVG -