All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@kernel.org>
To: Frederic Weisbecker <frederic@kernel.org>,
	Amit Matityahu <amitmat@amazon.com>
Cc: anna-maria@linutronix.de, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, dwmw@amazon.co.uk, jonnyc@amazon.com,
	abaransi@amazon.com, alonka@amazon.com, ronenk@amazon.com,
	farbere@amazon.com
Subject: Re: [PATCH] timers/migration: Fix livelock in tmigr_handle_remote_up()
Date: Thu, 04 Jun 2026 14:23:45 +0200	[thread overview]
Message-ID: <87a4ta5wa6.ffs@fw13> (raw)
In-Reply-To: <aiFJLiWDIVaMQOoV@localhost.localdomain>

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@kernel.org>

I'll add a comment to that for posterity.

  reply	other threads:[~2026-06-04 12:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 17:01 [PATCH] timers/migration: Fix livelock in tmigr_handle_remote_up() Amit Matityahu
2026-06-04  9:45 ` Frederic Weisbecker
2026-06-04 12:23   ` Thomas Gleixner [this message]
2026-06-04 12:38 ` [tip: timers/urgent] " tip-bot2 for Amit Matityahu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a4ta5wa6.ffs@fw13 \
    --to=tglx@kernel.org \
    --cc=abaransi@amazon.com \
    --cc=alonka@amazon.com \
    --cc=amitmat@amazon.com \
    --cc=anna-maria@linutronix.de \
    --cc=dwmw@amazon.co.uk \
    --cc=farbere@amazon.com \
    --cc=frederic@kernel.org \
    --cc=jonnyc@amazon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ronenk@amazon.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.