]> err.no Git - linux-2.6/commitdiff
[PATCH] idle threads should have a sane ->timestamp value
authorIngo Molnar <mingo@elte.hu>
Wed, 8 Mar 2006 05:55:27 +0000 (21:55 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 8 Mar 2006 22:14:00 +0000 (14:14 -0800)
Idle threads should have a sane ->timestamp value, to avoid init kernel
thread(s) from inheriting it and causing miscalculations in
try_to_wake_up().

Reported-by: Mike Galbraith <efault@gmx.de>.
Signed-off-by: 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

index 3454bb869fd068c070e8fbf219e981018305df99..e82c99f1db64328e3a7e1e2bda8aa22de0a9b537 100644 (file)
@@ -4335,6 +4335,7 @@ void __devinit init_idle(task_t *idle, int cpu)
        runqueue_t *rq = cpu_rq(cpu);
        unsigned long flags;
 
+       idle->timestamp = sched_clock();
        idle->sleep_avg = 0;
        idle->array = NULL;
        idle->prio = MAX_PRIO;