Re: [PATCH] sched: idle: move need_resched check after function rcu_idle_enter

2015-11-23 Thread Lianwei Wang
On Mon, Nov 23, 2015 at 9:57 AM, Peter Zijlstra wrote: > On Mon, Nov 23, 2015 at 09:42:06AM -0800, Lianwei Wang wrote: >> Issue was found on ARM/Qcom platform, but I think it is applicable to >> other platforms as well. I add a BUG_ON after rcu_enter_idle to catch >> it. The Qcom's cpuidle driver

Re: [PATCH] sched: idle: move need_resched check after function rcu_idle_enter

2015-11-23 Thread Peter Zijlstra
On Sat, Nov 21, 2015 at 01:02:02AM -0800, Lianwei Wang wrote: > The rcu_idle_endter may call wakeup_softirqd to set the need resched > flag on idle process. But if we don't check it after that, then the > cpu will enter idle state with RESCHED flag set and can not be woken > up by wakeup/resched ca

Re: [PATCH] sched: idle: move need_resched check after function rcu_idle_enter

2015-11-23 Thread Peter Zijlstra
On Mon, Nov 23, 2015 at 09:42:06AM -0800, Lianwei Wang wrote: > Issue was found on ARM/Qcom platform, but I think it is applicable to > other platforms as well. I add a BUG_ON after rcu_enter_idle to catch > it. The Qcom's cpuidle driver is not in mainline kernel yet. A: Because it messes up the

Re: [PATCH] sched: idle: move need_resched check after function rcu_idle_enter

2015-11-23 Thread Lianwei Wang
Issue was found on ARM/Qcom platform, but I think it is applicable to other platforms as well. I add a BUG_ON after rcu_enter_idle to catch it. The Qcom's cpuidle driver is not in mainline kernel yet. On Mon, Nov 23, 2015 at 5:05 AM, Peter Zijlstra wrote: > On Sat, Nov 21, 2015 at 01:02:02AM -08

Re: [PATCH] sched: idle: move need_resched check after function rcu_idle_enter

2015-11-23 Thread Peter Zijlstra
On Sat, Nov 21, 2015 at 01:02:02AM -0800, Lianwei Wang wrote: > The rcu_idle_endter may call wakeup_softirqd to set the need resched > flag on idle process. But if we don't check it after that, then the > cpu will enter idle state with RESCHED flag set and can not be woken > up by wakeup/resched ca

[PATCH] sched: idle: move need_resched check after function rcu_idle_enter

2015-11-21 Thread Lianwei Wang
The rcu_idle_endter may call wakeup_softirqd to set the need resched flag on idle process. But if we don't check it after that, then the cpu will enter idle state with RESCHED flag set and can not be woken up by wakeup/resched call anymore. Check need_resched after rcu_idle_enter to make sure the