Recently this patch came in:
commit d689fe222a858c767cb8594faf280048e532b53f Author: Thomas Gleixner tglx@linutronix.de Date: Wed Nov 13 21:01:57 2013 +0100
NOHZ: Check for nohz active instead of nohz enabled
and introduced a bug here. tick_nohz_active is initialized to zero and we are returning from this routine if it is zero. And hence we will never be able to cross this check. Actually this should not have been changed by above patch and should have stayed to tick_nohz_enabled.
Fix it.
Cc: stable@vger.kernel.org # 3.13.x Cc: stable@vger.kernel.org # 3.14.x Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- kernel/time/tick-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 9f8af69..ea0cdc1 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -967,7 +967,7 @@ static void tick_nohz_switch_to_nohz(void) struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); ktime_t next;
- if (!tick_nohz_active) + if (!tick_nohz_enabled) return;
local_irq_disable();
On Wed, 9 Apr 2014 20:55:29 +0530 Viresh Kumar viresh.kumar@linaro.org wrote:
Recently this patch came in:
commit d689fe222a858c767cb8594faf280048e532b53f Author: Thomas Gleixner tglx@linutronix.de Date: Wed Nov 13 21:01:57 2013 +0100
NOHZ: Check for nohz active instead of nohz enabled
and introduced a bug here. tick_nohz_active is initialized to zero and we are returning from this routine if it is zero. And hence we will never be able to cross this check. Actually this should not have been changed by above patch and should have stayed to tick_nohz_enabled.
But tick_nohz_active also gets set by tick_setup_sched_timer() which looks to be where it should get set. What is the case that this would set that variable and tick_setup_sched_timer() would not?
-- Steve
Fix it.
Cc: stable@vger.kernel.org # 3.13.x Cc: stable@vger.kernel.org # 3.14.x Signed-off-by: Viresh Kumar viresh.kumar@linaro.org
kernel/time/tick-sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 9f8af69..ea0cdc1 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -967,7 +967,7 @@ static void tick_nohz_switch_to_nohz(void) struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched); ktime_t next;
- if (!tick_nohz_active)
- if (!tick_nohz_enabled) return;
local_irq_disable();
On 9 April 2014 21:11, Steven Rostedt rostedt@goodmis.org wrote:
But tick_nohz_active also gets set by tick_setup_sched_timer() which looks to be where it should get set. What is the case that this would set that variable and tick_setup_sched_timer() would not?
These two are in parallel and only one of these will ever succeed. So, either tick_setup_sched_timer() or tick_nohz_switch_to_nohz() will set it.
linaro-kernel@lists.linaro.org