mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@kernel.org>
To: Sven Schnelle <svens@linux.ibm.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	Josh Triplett <josh@joshtriplett.org>,
	linux-kernel@vger.kernel.org, rcu@vger.kernel.org
Subject: Re: [PATCH 1/2] torture: use for_each_present() loop in torture_online_all()
Date: Mon, 14 Nov 2022 08:30:09 -0800	[thread overview]
Message-ID: <20221114163009.GE4001@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <yt9dtu31k0r9.fsf@linux.ibm.com>

On Mon, Nov 14, 2022 at 04:35:06PM +0100, Sven Schnelle wrote:
> "Paul E. McKenney" <paulmck@kernel.org> writes:
> 
> > On Fri, Nov 11, 2022 at 01:51:24PM +0100, Sven Schnelle wrote:
> >> A CPU listed in the possible mask doesn't have to be present, in
> >> which case it would crash the kernel in torture_online_all().
> >> To prevent this use a for_each_present() loop.
> >> 
> >> Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
> >
> > Looks good to me!  Any reason for no mailing list on CC?
> 
> No, my fault. I setup get_maintainer.pl to be called from git
> send-email, but looks like i did it wrong :-)

Been there, done that!  ;-)

> > Ah, and any synchronization required in case it is possible for a CPU
> > to leave the cpu_present_mask?  Or can they only be added?
> 
> Hmm... I think the main question is, whether it is ok for a cpu to be
> removed from the system when rcutorture is running? In both cases it
> would disappear from the cpu online mask, so i don't think the patch
> would change the behaviour. But i can check and send additional patches
> if there are other places that needs adjustment.

Yes, rcutorture has lower-level checks for CPUs being hotplugged
behind its back.  Which might be sufficient.  But this patch is in
response to something bad happening if the CPU is also not present in
the cpu_present_mask.  Would that same bad thing happen if rcutorture saw
the CPU in cpu_online_mask, but by the time it attempted to CPU-hotplug
it, that CPU was gone not just from cpu_online_mask, but also from
cpu_present_mask?

Or are CPUs never removed from cpu_present_mask?

							Thanx, Paul

  reply	other threads:[~2022-11-14 16:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20221111125126.3319474-1-svens@linux.ibm.com>
     [not found] ` <20221111125126.3319474-2-svens@linux.ibm.com>
     [not found]   ` <20221111185331.GA725751@paulmck-ThinkPad-P17-Gen-1>
2022-11-14 15:35     ` Sven Schnelle
2022-11-14 16:30       ` Paul E. McKenney [this message]
2022-11-15  6:55         ` Sven Schnelle
2022-11-15 13:41           ` Paul E. McKenney
2022-11-17  6:30             ` Sven Schnelle
2022-11-17 15:06               ` Paul E. McKenney
2022-11-18 23:23                 ` Paul E. McKenney

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=20221114163009.GE4001@paulmck-ThinkPad-P17-Gen-1 \
    --to=paulmck@kernel.org \
    --cc=dave@stgolabs.net \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rcu@vger.kernel.org \
    --cc=svens@linux.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®