lkml.org 
[lkml]   [2018]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] refcount: always allow checked forms
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.
\
 
 \ /
  Last update: 2018-07-15 22:05    [W:0.529 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site