Re: [PATCH v9 12/32] timers: Fix nextevt calculation when no timers are pending

Anna-Maria Behnsen
2023-12-12T13:22:21Z

Frederic Weisbecker <frederic@kernel.org> writes:

> Le Tue, Dec 05, 2023 at 12:53:03PM +0100, Anna-Maria Behnsen a écrit :
>>
>> Frederic, what do you think?
>
> So it looks like is_idle must be fixed.
>
> As for the timer softirq, ->next_expiry is already unreliable because when
> a timer is removed, ->next_expiry is not updated (even though that removed
> timer might have been the earliest). So ->next_expiry can already carry a
> "too early" value. The only constraint is that ->next_expiry can't be later
> than the first timer.
>
> So I'd rather put a comment somewhere about the fact that wrapping is expected
> to behave ok. But it's your call.

Ok. If both solutions are fine, I would like to take the solution with
updating the next_expiry values for empty bases. It will make the
compare of expiry values of global and local timer base easier in one of
the patches later on.

Thanks,

Anna-Maria