All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Mark Rutland <mark.rutland@arm.com>
Cc: dsterba@suse.cz, linux-kernel@vger.kernel.org,
	Will Deacon <will.deacon@arm.com>,
	Kees Cook <keescook@chromium.org>,
	Boqun Feng <boqun.feng@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] refcount: always allow checked forms
Date: Wed, 11 Jul 2018 19:37:05 +0200	[thread overview]
Message-ID: <20180711173705.j6qfye4rq3ccmdyq@twin.jikos.cz> (raw)
In-Reply-To: <20180711054946.wdkfoou6kt2a2vml@salmiak>

On Wed, Jul 11, 2018 at 06:49:46AM +0100, Mark Rutland wrote:
> > > Dave pointed out that it would be useful to be able to opt-in to full checks
> > > regardless of CONFIG_REFCOUNT_FULL, so that we can simplify callsites where we
> > > always want checks. I've spotted a few of these in code which is still awaiting
> > > conversion.
> > 
> > The motivation was code like
> > 
> > 	WARN_ON(refcount_read(&ref));
> > 	if (refcount_dec_and_test(&ref)) { ... }
> > 
> > so the warning is redundant for REFCOUNT_FULL, but I'm going to use the
> > _checked versions everywhere the performance of refcounts is not
> > critical.
> 
> If you will have conversion patches, do you want to pick this up as the start
> of a series?

The patches where I'd use the enhanced refcounts are nice-to-have and I
don't have an ETA so it would be better if the patch gets merged
independently. Thanks.

  reply	other threads:[~2018-07-11 17:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-03 10:01 [PATCH] refcount: always allow checked forms Mark Rutland
2018-07-03 10:33 ` Andrea Parri
2018-07-03 11:39   ` Mark Rutland
2018-07-03 18:30 ` Kees Cook
2018-07-11  5:44   ` Mark Rutland
2018-07-04  8:46 ` David Sterba
2018-07-11  5:49   ` Mark Rutland
2018-07-11 17:37     ` David Sterba [this message]
2018-07-12 12:08       ` Mark Rutland

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=20180711173705.j6qfye4rq3ccmdyq@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=boqun.feng@gmail.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=will.deacon@arm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.