Re: [PATCH 2/4] timer: relax tick stop in idle entry

From: Jacob Pan
Date: Thu Nov 19 2015 - 18:42:25 EST


On Thu, 19 Nov 2015 20:59:05 +0100
Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> 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@xxxxxxxxxxxxx> 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.
Tested, it did the trick also. has less impact than changing idle_cpu().

My other point is the callers of idle_cpu() will see it returns false
but in forced idle. Can't see anything bad since we skip load balance.

Thanks,

Jacob
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/