All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yury Norov <ynorov@nvidia.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, "Oleg Nesterov" <oleg@redhat.com>,
	"Paul E . McKenney" <paulmck@kernel.org>,
	"Phil Auld" <pauld@redhat.com>,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	"Shrikanth Hegde" <sshegde@linux.ibm.com>,
	"Tejun Heo" <tj@kernel.org>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	"Valentin Schneider" <vschneid@redhat.com>,
	"Yury Norov" <yury.norov@gmail.com>,
	"Bradley Morgan" <include@grrlz.net>
Subject: Re: [PATCH v2] stop_machine: Make stop_one_cpu_nowait() return void
Date: Wed, 29 Jul 2026 09:40:04 -0400	[thread overview]
Message-ID: <amoCtKzXJbgf30Wn@yury> (raw)
In-Reply-To: <20260729125133.GA751831@noisy.programming.kicks-ass.net>

On Wed, Jul 29, 2026 at 02:51:33PM +0200, Peter Zijlstra wrote:
> On Tue, Jul 28, 2026 at 10:23:54PM -0400, Yury Norov wrote:
> > No caller checks the return value from stop_one_cpu_nowait(). All
> > callers require the callback to run and arrange for the target CPU's
> > stopper to remain enabled while queuing the work. In particular, commit
> > f0498d2a54e7 ("sched: Fix stop_one_cpu_nowait() vs hotplug") added
> > preemption protection to the scheduler callers so that queuing must
> > succeed once the target CPU has been observed online.
> > 
> > Therefore, a failure is an unrecoverable violation rather than a condition
> > individual callers can recover from. Diagnose it with WARN_ON_ONCE() in
> > stop_one_cpu_nowait(). A check in the common helper covers current and
> > future callers consistently, while individual checks would duplicate
> > the same non-recoverable handling at every call site.
> > 
> > Make the function return void because there is no longer a meaningful
> > result for callers to consume.
> > 
> > On UP, warn if the supplied CPU is not the current CPU because the work
> > cannot be scheduled in that case.
> > 
> > CC: Bradley Morgan <include@grrlz.net>
> > Signed-off-by: Yury Norov <ynorov@nvidia.com>
> 
> I suppose; you want me to take this through the scheduler tree?

Sure, thanks!

  reply	other threads:[~2026-07-29 13:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29  2:23 [PATCH v2] stop_machine: Make stop_one_cpu_nowait() return void Yury Norov
2026-07-29 12:45 ` Bradley Morgan
2026-07-29 12:51 ` Peter Zijlstra
2026-07-29 13:40   ` Yury Norov [this message]
2026-07-29 15:30 ` Shrikanth Hegde

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=amoCtKzXJbgf30Wn@yury \
    --to=ynorov@nvidia.com \
    --cc=bigeasy@linutronix.de \
    --cc=include@grrlz.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=pauld@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=sshegde@linux.ibm.com \
    --cc=thomas.weissschuh@linutronix.de \
    --cc=tj@kernel.org \
    --cc=vschneid@redhat.com \
    --cc=yury.norov@gmail.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.