linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Marco Elver <elver@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Will Deacon <will@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Dmitry Vyukov <dvyukov@google.com>,
	Alexander Potapenko <glider@google.com>,
	kasan-dev <kasan-dev@googlegroups.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-arch <linux-arch@vger.kernel.org>
Subject: Re: [PATCH 8/8] locking/atomics: Use read-write instrumentation for atomic RMWs
Date: Fri, 14 Aug 2020 13:34:05 +0100	[thread overview]
Message-ID: <20200814123405.GD68877@C02TD0UTHF1T.local> (raw)
In-Reply-To: <CANpmjNNXXMXMBOqJqQTkDDoavggDVktNL6AZn-hLMbEPYzZ_0w@mail.gmail.com>

On Fri, Aug 14, 2020 at 01:59:08PM +0200, Marco Elver wrote:
> On Fri, 14 Aug 2020 at 13:31, Mark Rutland <mark.rutland@arm.com> wrote:
> > On Fri, Aug 14, 2020 at 12:28:26PM +0100, Mark Rutland wrote:
> > > Hi,
> > >
> > > Sorry to come to this rather late -- this comment equally applies to v2
> > > so I'm replying here to have context.
> >
> > ... and now I see that was already applied, so please ignore this!
> 
> Thank you for the comment anyway. If this is something urgent, we
> could send a separate patch to change.

I'm not particularly concerned; it would've been nice for legibility but
I don't think it's very important. I'm happy with leaving it as-is or
with a cleanup at some point -- I'll defer to Peter to decide either
way.

> My argument in favour of keeping it as-is was that the alternative
> would throw away the "type" and we no longer recognize a difference
> between arguments (in fairness, currently not important though). If,
> say, we get an RMW that has a constant argument though, the current
> version would do the "right thing" as far as I can tell. Maybe I'm
> overly conservative here, but it saves us worrying about some future
> use-case breaking this more than before.

I'd argue that clarity is preferable, since we'd have to change this to
deal with other variations in future (e.g. mixes of RW and W). I have
difficulty imagining an atomic op that'd work on multiple atomic
variables with different access types, so I suspect it's unlikely to
happen.

As above, not a big deal regardless.

Thanks,
Mark.

      reply	other threads:[~2020-08-14 12:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21 10:30 [PATCH 0/8] kcsan: Compound read-write instrumentation Marco Elver
2020-07-21 10:30 ` [PATCH 1/8] kcsan: Support compounded " Marco Elver
2020-07-21 10:30 ` [PATCH 2/8] objtool, kcsan: Add __tsan_read_write to uaccess whitelist Marco Elver
2020-07-21 14:04   ` Peter Zijlstra
2020-07-21 10:30 ` [PATCH 3/8] kcsan: Skew delay to be longer for certain access types Marco Elver
2020-07-21 14:05   ` Peter Zijlstra
2020-07-21 14:26     ` Marco Elver
2020-07-21 14:34       ` peterz
2020-07-21 10:30 ` [PATCH 4/8] kcsan: Add missing CONFIG_KCSAN_IGNORE_ATOMICS checks Marco Elver
2020-07-21 14:09   ` Peter Zijlstra
2020-07-21 14:21     ` Marco Elver
2020-07-21 10:30 ` [PATCH 5/8] kcsan: Test support for compound instrumentation Marco Elver
2020-07-21 11:06   ` Marco Elver
2020-07-21 10:30 ` [PATCH 6/8] instrumented.h: Introduce read-write instrumentation hooks Marco Elver
2020-07-21 10:30 ` [PATCH 7/8] asm-generic/bitops: Use instrument_read_write() where appropriate Marco Elver
2020-07-21 10:30 ` [PATCH 8/8] locking/atomics: Use read-write instrumentation for atomic RMWs Marco Elver
2020-07-21 14:18   ` Peter Zijlstra
2020-07-22 10:11     ` Marco Elver
2020-08-14 11:28       ` Mark Rutland
2020-08-14 11:31         ` Mark Rutland
2020-08-14 11:59           ` Marco Elver
2020-08-14 12:34             ` Mark Rutland [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=20200814123405.GD68877@C02TD0UTHF1T.local \
    --to=mark.rutland@arm.com \
    --cc=arnd@arndb.de \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.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;
as well as URLs for NNTP newsgroup(s).