From: Peter Zijlstra <peterz@infradead.org>
To: Aniket Gattani <aniketgattani@google.com>
Cc: bsegall@google.com, joshdon@google.com,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
mathieu.desnoyers@efficios.com, mingo@redhat.com,
paulmck@kernel.org
Subject: Re: [PATCH 1/2] sched/membarrier: Use per-CPU mutexes for targeted commands
Date: Tue, 28 Apr 2026 14:35:52 +0200 [thread overview]
Message-ID: <20260428123552.GX3102624@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20260410235511.2989255-1-aniketgattani@google.com>
On Fri, Apr 10, 2026 at 11:55:11PM +0000, Aniket Gattani wrote:
> On Fri, 10 Apr 2026 14:56:55 +0200, Peter Zijlstra <peterz@infradead.org> wrote:
> > On Thu, Apr 09, 2026 at 09:22:22PM +0000, Aniket Gattani wrote:
> > > + if (cpu_id >= 0 && (cpu_id >= nr_cpu_ids || !cpu_possible(cpu_id)))
> > > + return 0;
> >
> > Did that want to be:
> >
> > if ((unsigned)cpu_id >= nr_cpu_ids || !cpu_possible(cpu_id))
> >
> > ?
>
> Thanks for the review.
> Agreed. I will fix this in v2 and will wait a couple of business days for anyone else to respond.
Was just looking at v2, and this is terribly broken, sorry for the
suggestion.
membarrier_private_expedited() very much has to deal with cpu_id==-1.
next prev parent reply other threads:[~2026-04-28 12:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 21:22 [PATCH 0/2] sched/membarrier: Use per-CPU mutexes for targeted commands Aniket Gattani
2026-04-09 21:22 ` [PATCH 1/2] " Aniket Gattani
2026-04-10 12:48 ` Mathieu Desnoyers
2026-04-10 23:44 ` Aniket Gattani
2026-04-10 12:56 ` Peter Zijlstra
2026-04-10 23:55 ` Aniket Gattani
2026-04-28 12:35 ` Peter Zijlstra [this message]
2026-04-09 21:22 ` [PATCH 2/2] selftests/membarrier: Add rseq stress test for CFS throttle interactions Aniket Gattani
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=20260428123552.GX3102624@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=aniketgattani@google.com \
--cc=bsegall@google.com \
--cc=joshdon@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@redhat.com \
--cc=paulmck@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox