Re: [PATCH 16/32] nohz/cpuset: Wake up adaptive nohz CPU when a timer gets enqueued

Peter Zijlstra
2011-08-29T15:51:26Z

On Mon, 2011-08-15 at 17:52 +0200, Frederic Weisbecker wrote:
> Wake up a CPU when a timer list timer is enqueued there and
> the CPU is in adaptive nohz mode. Sending an IPI to it makes
> it reconsidering the next timer to program on top of recent
> updates.
>

> include/linux/sched.h | 4 ++--
> kernel/sched.c | 33 ++++++++++++++++++++++++++++++++-
> kernel/time/tick-sched.c | 5 ++++-
> kernel/timer.c | 2 +-
> 4 files changed, 39 insertions(+), 5 deletions(-)

So here I would have expected timer_needs_cpu() and an addition to
tick_nohz_can_stop_tick(). Why does sched.c get touched at all?

Also, all the delta_jiffies stuff in the current
tick_nohz_stop_sched_tick() deals with this, why duplicate the logic?