diff options
author | Andy Lutomirski <luto@amacapital.net> | 2014-06-04 19:31:16 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-06-05 12:09:51 +0200 |
commit | 82c65d60d64401aedc1006d6572469bbfdf148de (patch) | |
tree | ffa4aa0ece7bcff7bf5426b882c90e80172ff15b /kernel/timeconst.bc | |
parent | sched, trace: Add a tracepoint for IPI-less remote wakeups (diff) | |
download | linux-82c65d60d64401aedc1006d6572469bbfdf148de.tar.xz linux-82c65d60d64401aedc1006d6572469bbfdf148de.zip |
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 <luto@amacapital.net>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: nicolas.pitre@linaro.org
Cc: daniel.lezcano@linaro.org
Cc: umgwanakikbuti@gmail.com
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Link: http://lkml.kernel.org/r/b2059fcb4c613d520cb503b6fad6e47033c7c203.1401902905.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/timeconst.bc')
0 files changed, 0 insertions, 0 deletions