aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cred.c
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@amacapital.net>2014-06-04 13:31:16 -0400
committerIngo Molnar <mingo@kernel.org>2014-06-05 06:09:51 -0400
commit82c65d60d64401aedc1006d6572469bbfdf148de (patch)
treeffa4aa0ece7bcff7bf5426b882c90e80172ff15b /kernel/cred.c
parentdfc68f29ae67f2a6e799b44e6a4eb3417dffbfcd (diff)
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/cred.c')
0 files changed, 0 insertions, 0 deletions