From: "Paul E. McKenney" <paulmck@kernel.org>
To: David Laight <David.Laight@ACULAB.COM>
Cc: 'Marco Elver' <elver@google.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
Randy Dunlap <rdunlap@infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [Intel-gfx] [PATCH] list: Prevent compiler reloads inside 'safe' list iteration
Date: Tue, 10 Mar 2020 08:47:49 -0700 [thread overview]
Message-ID: <20200310154749.GZ2935@paulmck-ThinkPad-P72> (raw)
In-Reply-To: <77ff4da6b0a7448c947af6de4fb43cdb@AcuMS.aculab.com>
On Tue, Mar 10, 2020 at 03:05:57PM +0000, David Laight wrote:
> From: Marco Elver
> > Sent: 10 March 2020 14:10
> ...
> > FWIW, for writes we're already being quite generous, in that plain
> > aligned writes up to word-size are assumed to be "atomic" with the
> > default (conservative) config, i.e. marking such writes is optional.
> > Although, that's a generous assumption that is not always guaranteed
> > to hold (https://lore.kernel.org/lkml/20190821103200.kpufwtviqhpbuv2n@willie-the-truck/).
>
> Remind me to start writing everything in assembler.
Been there, done that. :-/
> That and to mark all structure members 'volatile'.
Indeed. READ_ONCE() and WRITE_ONCE() get this same effect, but without
pessimizing non-concurrent accesses to those same members. Plus KCSAN
knows about READ_ONCE(), WRITE_ONCE(), and also volatile members.
Thanx, Paul
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-03-10 15:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-10 9:21 [Intel-gfx] [PATCH] list: Prevent compiler reloads inside 'safe' list iteration Chris Wilson
2020-03-10 11:36 ` David Laight
2020-03-10 11:50 ` Chris Wilson
2020-03-10 12:23 ` David Laight
2020-03-10 12:50 ` Chris Wilson
2020-03-10 12:50 ` Paul E. McKenney
2020-03-10 13:52 ` Mark Rutland
2020-03-10 14:09 ` Marco Elver
2020-03-10 15:05 ` David Laight
2020-03-10 15:47 ` Paul E. McKenney [this message]
2020-03-12 2:58 ` Andrew Morton
2020-03-10 19:57 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2020-03-11 8:13 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-03-11 12:51 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
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=20200310154749.GZ2935@paulmck-ThinkPad-P72 \
--to=paulmck@kernel.org \
--cc=David.Laight@ACULAB.COM \
--cc=akpm@linux-foundation.org \
--cc=elver@google.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=stable@vger.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;
as well as URLs for NNTP newsgroup(s).