Re: [PATCH 3/3] tick/nohz: Don't shutdown the lowres tick from itself

From: Frederic Weisbecker
Date: Tue Jul 25 2023 - 06:02:53 EST


On Mon, Jul 17, 2023 at 05:30:49PM +0000, Joel Fernandes wrote:
> I think I see what you mean now. Maybe I wrongly assumed the above 'Skip
> reprogram of event' code could early return and skip over
> "tick_program_event(KTIME_MAX, 1);", but I think it cannot because of the
> "expires != ts->next_tick" check.
>
> Maybe the "tick_program_event(KTIME_MAX, 1)" bit in tick_nohz_handler() is
> supposed to handle buggy hardware where an unexpected timer event came
> through? In such a situation, the idle loop will not write
> "tick_program_event(KTIME_MAX, 1);" again because it already did so the
> previous time, as you pointed.

Well at least if the double write was put there intentionally in order to
fix buggy hardware, this was neither mentionned nor commented anywhere AFAICT.

Thanks.

>
> Adding Vineeth who is also looking into this code.
>
> thanks,
>
> - Joel
>