[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200129192602.GA2935@paulmck-ThinkPad-P72>
Date: Wed, 29 Jan 2020 11:26:02 -0800
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Marco Elver <elver@...gle.com>, Qian Cai <cai@....pw>,
Will Deacon <will@...nel.org>, Ingo Molnar <mingo@...hat.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
kasan-dev <kasan-dev@...glegroups.com>
Subject: Re: [PATCH] locking/osq_lock: fix a data race in osq_wait_next
On Wed, Jan 29, 2020 at 07:49:35PM +0100, Peter Zijlstra wrote:
> On Tue, Jan 28, 2020 at 04:22:53PM -0800, Paul E. McKenney wrote:
> > On Tue, Jan 28, 2020 at 05:56:55PM +0100, Peter Zijlstra wrote:
> > > On Tue, Jan 28, 2020 at 12:46:26PM +0100, Marco Elver wrote:
> > >
> > > > > Marco, any thought on improving KCSAN for this to reduce the false
> > > > > positives?
> > > >
> > > > Define 'false positive'.
> > >
> > > I'll use it where the code as written is correct while the tool
> > > complains about it.
> >
> > I could be wrong, but I would guess that Marco is looking for something
> > a little less subjective and a little more specific. ;-)
>
> How is that either? If any valid translation by a compile results in
> correct functionality, yet the tool complains, then surely we can speak
> of a objective fact.
Marco covered my concern in his point about the need to change the
compiler.
In any case, agreed, if a read does nothing but feed into the old/new
values for a CAS, the only thing a reasonable compiler (as opposed to
a just-barely-meets-the-standard demonic compiler) can do to you is to
decrease the CAS success rate.
Thanx, Paul
Powered by blists - more mailing lists