[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151119195905.GR3816@twins.programming.kicks-ass.net>
Date: Thu, 19 Nov 2015 20:59:05 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Jacob Pan <jacob.jun.pan@...ux.intel.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
John Stultz <john.stultz@...aro.org>,
LKML <linux-kernel@...r.kernel.org>,
Arjan van de Ven <arjan@...ux.intel.com>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
Len Brown <len.brown@...el.com>,
Rafael Wysocki <rafael.j.wysocki@...el.com>,
Eduardo Valentin <edubezval@...il.com>,
Paul Turner <pjt@...gle.com>,
Josh Triplett <josh@...htriplett.org>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH 2/4] timer: relax tick stop in idle entry
On Thu, Nov 19, 2015 at 11:21:25AM -0800, Jacob Pan wrote:
> On Thu, 19 Nov 2015 20:06:30 +0100
> Peter Zijlstra <peterz@...radead.org> wrote:
>
> > Which one? That is, I cannot find a idle_cpu() call from
> > tick_nohz_irq_exit().
> it is tick_irq_exit(void), i will not call tick_nohz_irq_exit() if
> !idle_cpu()
Ah, but I think we really only need to test for the idle task there, the
&& need_resched() part of that function takes care of the rest.
Once we have need_resched() set, we'll be on our way to
tick_nohz_idle_exit() to restart the tick again.
---
kernel/softirq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 479e4436f787..3bd30404f2ee 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -367,7 +367,7 @@ static inline void tick_irq_exit(void)
int cpu = smp_processor_id();
/* Make sure that timer wheel updates are propagated */
- if ((idle_cpu(cpu) && !need_resched()) || tick_nohz_full_cpu(cpu)) {
+ if ((is_idle_task(current) && !need_resched()) || tick_nohz_full_cpu(cpu)) {
if (!in_interrupt())
tick_nohz_irq_exit();
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists