idle: add a check for need_resched() after rcu_idle_enter
rcu_idle_enter() can wake up ksoftirqd to finish RCU callbacks before entering idle. Hence add a check for need_resched() after rcu_idle_enter(). The CPU enters idle without this check and tasks queued on this CPU are starved until CPU exits idle. The cpuidle subsystem has checks for need_resched() before entering CPU idle, but these checks does not come into the picture if cpuidle is not enabled or becomes active during boot. Change-Id: I747e49acb41f201bdc9a7c12d81f366e76bbdbb3 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
parent
13687eeaa5
commit
632b40616e
|
@ -117,7 +117,10 @@ static void cpu_idle_loop(void)
|
|||
if (!current_clr_polling_and_test()) {
|
||||
stop_critical_timings();
|
||||
rcu_idle_enter();
|
||||
arch_cpu_idle();
|
||||
if (!need_resched())
|
||||
arch_cpu_idle();
|
||||
else
|
||||
local_irq_enable();
|
||||
WARN_ON_ONCE(irqs_disabled());
|
||||
rcu_idle_exit();
|
||||
start_critical_timings();
|
||||
|
|
Loading…
Reference in New Issue