Re: [PATCH v9 19/32] timers: add_timer_on(): Make sure TIMER_PINNED flag is set

Sebastian Siewior
2023-12-05T18:29:31Z

On 2023-12-01 10:26:41 [+0100], Anna-Maria Behnsen wrote:
> When adding a timer to the timer wheel using add_timer_on(), it is an
> implicitly pinned timer. With the timer pull at expiry time model in place,
> TIMER_PINNED flag is required to make sure timers end up in proper base.
>
> Add TIMER_PINNED flag unconditionally when add_timer_on() is executed.

This is odd. I have some vague memory that this was already the case.
Otherwise all add_timer_on() users without TIMER_PINNED may get it wrong
due to optimisation. Looking at git history it was never the case and I
can't confuse it with hrtimer since it never supported the "_on()"
feature…
At least the mix timer in drivers/char/random.c is not using the PINNED
flag with _on(). So this was wrong then?…

Sebastian