Re: [PATCH] timers/migration: Fix livelock in tmigr_handle_remote_up()
From: Thomas Gleixner
Date: Thu Jun 04 2026 - 08:35:13 EST
On Thu, Jun 04 2026 at 11:45, Frederic Weisbecker wrote:
> Le Wed, Jun 03, 2026 at 05:01:39PM +0000, Amit Matityahu a écrit :
>> Questions for maintainers:
>>
>> 1. What was the original rationale for the cpu != smp_processor_id()
>> check? There is no code comment, commit message explanation or anything
>> in the original patch's email discussion as to why
>> timer_expire_remote() is skipped for the local CPU.
>
> The rationale was about assuming that such an expired timerqueue actually
> reflected a timer that was handled locally already and so it could be safely
> discarded. So we could spare some locking.
Right, but the assumption would only be valid _if_ the jiffies value
which was used in run_timers(GLOBAL) is propagated into the remote
handling.
>> - if (cpu != smp_processor_id())
>> - timer_expire_remote(cpu);
>> + timer_expire_remote(cpu);
>
> Reviewed-by: Frederic Weisbecker <frederic@xxxxxxxxxx>
I'll add a comment to that for posterity.