From: David Laight <david.laight.linux@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Waiman Long <longman@redhat.com>, Ingo Molnar <mingo@redhat.com>,
Will Deacon <will@kernel.org>, Boqun Feng <boqun@kernel.org>,
linux-kernel@vger.kernel.org, Davidlohr Bueso <dave@stgolabs.net>,
Haakon Bugge <haakon.bugge@oracle.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Yafang Shao <laoar.shao@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] locking/osq_lock: Ensure proper locking semantics for osq_lock/osq_unlock()
Date: Tue, 15 Sep 2026 09:36:51 +0100 [thread overview]
Message-ID: <20260915093651.13d59166@pumpkin> (raw)
In-Reply-To: <20260915051905.GB776954@noisy.programming.kicks-ass.net>
On Tue, 15 Sep 2026 07:19:05 +0200
Peter Zijlstra <peterz@infradead.org> wrote:
> On Mon, Sep 14, 2026 at 10:30:12PM -0400, Waiman Long wrote:
> > On 9/14/26 7:22 AM, Peter Zijlstra wrote:
>
> > > This doesn't make sense. You cannot argue that the code is correct as is
> > > and still add Fixes.
> >
> > That is true. I added this paragraph to show that it is not a serious bug,
> > but I still think it is better to fix it or we have to explicitly say that
> > it is not a real lock in term of how it can be used. I have taken it out to
> > avoid confusion.
>
> "It is not a real lock" will do. It has always been meant as a optimistic
> spin queue -- very much not a lock.
>
>
I'm not so sure, assuming that is probably short sighted and it will
cause grief sometime in the future.
I did start trying to locate the actual race.
If a read barrier fixes it there must be two reads that get swapped,
so it should be possible to find them.
Unfortunately I don't have a system that is likely to reproduce the error.
David
next prev parent reply other threads:[~2026-09-15 8:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-10 14:19 Waiman Long
2026-09-14 8:10 ` [PATCH] p " Haakon Bugge
2026-09-14 9:53 ` [PATCH] locking/osq_lock: Ensure proper locking semantics " David Laight
2026-09-14 20:22 ` Waiman Long
2026-09-14 11:22 ` Peter Zijlstra
2026-09-15 2:30 ` Waiman Long
2026-09-15 5:19 ` Peter Zijlstra
2026-09-15 8:36 ` David Laight [this message]
2026-09-15 8:26 ` Peter Zijlstra
[not found] ` <B7EAC6BE-D491-428E-8943-CE2F6DF390C6@oracle.com>
2026-09-15 1:09 ` Waiman Long
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=20260915093651.13d59166@pumpkin \
--to=david.laight.linux@gmail.com \
--cc=boqun@kernel.org \
--cc=dave@stgolabs.net \
--cc=haakon.bugge@oracle.com \
--cc=laoar.shao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
--cc=will@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
all inboxes | Powered by JetHome®