All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: paulmck@kernel.org, quic_mojha@quicinc.com, vschneid@redhat.com,
	neeraj.upadhyay@kernel.org, frederic@kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH stop-machine] Fix rcu_momentary_eqs() call in multi_cpu_stop()
Date: Thu, 16 Jan 2025 14:30:17 +0100	[thread overview]
Message-ID: <87wmeuanti.ffs@tglx> (raw)
In-Reply-To: <689a793b-6931-42e1-afbe-d920e1b39228@paulmck-laptop>


$Subject: [PATCH stop-machine] Fix rcu_momentary_eqs() call in multi_cpu_stop()

[PATCH prefix] Shortlog - That's not a valid subject line.

[PATCH] prefix: Shortlog - Is what's expected, no?

On Thu, Dec 12 2024 at 11:00, Paul E. McKenney wrote:

As this patch is from Mukesh, this want's a

   From: Mukesh ....

line right here.

> The multi_cpu_stop() contains a loop that can initially be executed
> with

s/The//

> interrupts enabled (in the MULTI_STOP_NONE and MULTI_STOP_PREPARE states).

> Interrupts are guaranteed to be once the MULTI_STOP_DISABLE_IRQ state
> is reached.

That's not a parseable sentence.

> Unfortunately, the rcu_momentary_eqs() function that is currently
> invoked on each pass through this loop requires that interrupts be
> disabled.

What's unfortunate about that? It's a face rcu_momentary_eqs() requires
to be invoked with interrupts disabled.

> This commit therefore moves this call to rcu_momentary_eqs() to the body

'This commit' is equally pointless as 'This patch'.

git grep 'This patch' Documentation/process

> of the "else if (curstate > MULTI_STOP_PREPARE)" portion of the loop, thus
> guaranteeing that interrupts will be disabled on each call, as
> required.

Something like this perhaps:

  Move the invocation of rcu_momentary_eqs() into the interrupt disabled
  section of the loop.

Hmm?

> Kudos to 朱恺乾 (Kaiqian) for noting that this had not made it to mainline.
>
> [ paulmck: Update from rcu_momentary_dyntick_idle() to rcu_momentary_eqs(). ]
>
> Link: https://lore.kernel.org/all/1712649736-27058-1-git-send-email-quic_mojha@quicinc.com/

Link below the SOBs please.

> Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
>
> diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
> index da821ce258ea7..8896d844d738f 100644
> --- a/kernel/stop_machine.c
> +++ b/kernel/stop_machine.c
> @@ -250,8 +250,8 @@ static int multi_cpu_stop(void *data)
>  			 * be detected and reported on their side.
>  			 */
>  			touch_nmi_watchdog();
> +			rcu_momentary_eqs();

Can we please have a comment why this call is actually there and what it
does, similar to the one for touch_nmi_watchdog()?

Thanks,

        tglx

      reply	other threads:[~2025-01-16 13:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12 19:00 [PATCH stop-machine] Fix rcu_momentary_eqs() call in multi_cpu_stop() Paul E. McKenney
2025-01-16 13:30 ` Thomas Gleixner [this message]

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=87wmeuanti.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=frederic@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neeraj.upadhyay@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=quic_mojha@quicinc.com \
    --cc=vschneid@redhat.com \
    /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.