mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: paulmck@kernel.org
Cc: David Laight <David.Laight@ACULAB.COM>,
	"'Marco Elver'" <elver@google.com>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] list: Prevent compiler reloads inside 'safe' list iteration
Date: Wed, 11 Mar 2020 19:58:10 -0700	[thread overview]
Message-ID: <20200311195810.959d4f40d6013ee59a238cf3@linux-foundation.org> (raw)
In-Reply-To: <20200310154749.GZ2935@paulmck-ThinkPad-P72>

On Tue, 10 Mar 2020 08:47:49 -0700 "Paul E. McKenney" <paulmck@kernel.org> wrote:

> 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.
> 

So I take it from all the above that we should do this.

Did anyone actually review the code? :)

      reply	other threads:[~2020-03-12  2:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10  9:21 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
2020-03-12  2:58               ` Andrew Morton [this message]

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=20200311195810.959d4f40d6013ee59a238cf3@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=David.Laight@ACULAB.COM \
    --cc=chris@chris-wilson.co.uk \
    --cc=elver@google.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@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

all inboxes | Powered by JetHome®