Files
linux/kernel
Andy Lutomirski 82c65d60d6 sched/idle: Clear polling before descheduling the idle thread
Currently, the only real guarantee provided by the polling bit is
that, if you hold rq->lock and the polling bit is set, then you can
set need_resched to force a reschedule.

The only reason the lock is needed is that the idle thread might not
be running at all when setting its need_resched bit, and rq->lock
keeps it pinned.

This is easy to fix: just clear the polling bit before scheduling.
Now the idle thread's polling bit is only ever set when
rq->curr == rq->idle.

Signed-off-by: Andy Lutomirski <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Rafael J. Wysocki <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/b2059fcb4c613d520cb503b6fad6e47033c7c203.1401902905.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <[email protected]>
2014-06-05 12:09:51 +02:00
..
2014-04-07 16:35:53 -07:00
2013-11-13 12:09:34 +09:00
…
…
2014-05-13 11:26:27 -04:00
…
…
…
…
…
…
…
2013-12-04 14:09:46 +10:30
…
…
2013-12-18 19:04:50 -08:00
…
…
…
2014-04-30 13:46:17 +02:00
…
…
…