From: "Paul E. McKenney" <paulmck@kernel.org>
To: David Laight <David.Laight@ACULAB.COM>
Cc: 'Marco Elver' <elver@google.com>,
Eric Dumazet <edumazet@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Will Deacon <will@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
the arch/x86 maintainers <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: Confused about hlist_unhashed_lockless()
Date: Mon, 3 Feb 2020 09:25:54 -0800 [thread overview]
Message-ID: <20200203172554.GL2935@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <154c51cc385544789c9fa0b233fc76e7@AcuMS.aculab.com>
On Mon, Feb 03, 2020 at 04:05:25PM +0000, David Laight wrote:
> From: Marco Elver
> > Sent: 03 February 2020 15:55
> >
> > On Mon, 3 Feb 2020 at 16:45, David Laight <David.Laight@aculab.com> wrote:
> > >
> > > From: Eric Dumazet
> > > > Sent: 31 January 2020 18:53
> > > >
> > > > On Fri, Jan 31, 2020 at 10:48 AM Eric Dumazet <edumazet@google.com> wrote:
> > > > >
> > > >
> > > > > This is nice, now with have data_race()
> > > > >
> > > > > Remember these patches were sent 2 months ago, at a time we were
> > > > > trying to sort out things.
> > > > >
> > > > > data_race() was merged a few days ago.
> > > >
> > > > Well, actually data_race() is not there yet anyway.
> > >
> > > Shouldn't it be NO_DATA_RACE() ??
> >
> > Various options were considered, and based on feedback from Linus,
> > decided 'data_race(..)' is the best option:
> > https://lore.kernel.org/linux-fsdevel/CAHk-
> > =wg5CkOEF8DTez1Qu0XTEFw_oHhxN98bDnFqbY7HL5AB2g@mail.gmail.com/
> >
> > It's meant to be as unobtrusive as possible, and an all-caps macro was
> > ruled out.
>
> Except that it then looks like something that actually does something.
>
> > Second, the "NO_" prefix would be incorrect, since it'd be the
> > opposite of what it is. The macro is meant to document and mark a
> > deliberate data race.
>
> It should be IGNORE_DATA_RACE() then.
People will get used to the name more quickly than they will get used
to typing the extra seven characters. Here is the current comment header:
/*
* data_race(): macro to document that accesses in an expression may conflict with
* other concurrent accesses resulting in data races, but the resulting
* behaviour is deemed safe regardless.
*
* This macro *does not* affect normal code generation, but is a hint to tooling
* that data races here should be ignored.
*/
I will be converting this to docbook form.
In addition, in the KCSAN documentation:
* KCSAN understands the ``data_race(expr)`` annotation, which tells KCSAN that
any data races due to accesses in ``expr`` should be ignored and resulting
behaviour when encountering a data race is deemed safe.
Fair enough?
Thanx, Paul
next prev parent reply other threads:[~2020-02-03 17:25 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-31 16:43 Will Deacon
2020-01-31 16:48 ` Eric Dumazet
2020-01-31 16:57 ` Will Deacon
2020-01-31 17:06 ` Eric Dumazet
2020-01-31 17:20 ` Will Deacon
2020-01-31 17:33 ` Eric Dumazet
2020-01-31 18:32 ` Will Deacon
2020-01-31 19:47 ` Thomas Gleixner
2020-01-31 20:52 ` Paul E. McKenney
2020-01-31 18:43 ` Peter Zijlstra
2020-01-31 18:48 ` Eric Dumazet
2020-01-31 18:52 ` Eric Dumazet
2020-01-31 20:53 ` Paul E. McKenney
2020-01-31 21:04 ` Eric Dumazet
2020-01-31 21:19 ` Paul E. McKenney
2020-02-03 15:45 ` David Laight
2020-02-03 15:54 ` Marco Elver
2020-02-03 16:05 ` David Laight
2020-02-03 17:25 ` Paul E. McKenney [this message]
2020-02-03 15:58 ` Paul E. McKenney
2020-02-03 16:02 ` Will Deacon
2020-02-03 17:29 ` Paul E. McKenney
2020-02-03 18:27 ` Will Deacon
2020-02-03 21:16 ` Paul E. McKenney
2020-01-31 19:20 ` Marco Elver
2020-01-31 18:52 ` Paul E. McKenney
2020-01-31 18:55 ` Eric Dumazet
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=20200203172554.GL2935@paulmck-ThinkPad-P72 \
--to=paulmck@kernel.org \
--cc=David.Laight@ACULAB.COM \
--cc=edumazet@google.com \
--cc=elver@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
--cc=x86@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®