Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81c29a85 authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds
Browse files

[PATCH] idle threads should have a sane ->timestamp value



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: default avatarMike Galbraith <efault@gmx.de&gt;.>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4d6660eb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;