Re: [PATCH 2/2] timers: Fix warning in __run_timers()
From: Frederic Weisbecker
Date: Tue Apr 05 2022 - 22:40:32 EST
On Tue, Apr 05, 2022 at 09:17:32PM +0200, Anna-Maria Behnsen wrote:
> When the timer base is empty, base::next_expiry is set to base::clk +
> NEXT_TIMER_MAX_DELTA and base::next_expiry_recalc is false. When no timer
> is queued until jiffies reaches base::next_expiry value, the warning for
> not finding any expired timer and base::next_expiry_recalc is false in
> __run_timers() triggers.
>
> To prevent triggering the warning in this valid scenario
> base::timers_pending needs to be added to the warning condition.
>
> Fixes: 31cd0e119d50 ("timers: Recalculate next timer interrupt only when necessary")
> Reported-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
> Signed-off-by: Anna-Maria Behnsen <anna-maria@xxxxxxxxxxxxx>
Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
Thanks!