On Wed, May 31, 2017 at 4:09 AM, Peter Zijlstra wrote:
> On Wed, May 31, 2017 at 10:45:09AM +, Reshetova, Elena wrote:
>
>> > +static inline __must_check bool refcount_add_not_zero(unsigned int i,
>> > +
>> > refcount_t *r)
>> > +{
>> > + return
On Wed, May 31, 2017 at 4:09 AM, Peter Zijlstra wrote:
> On Wed, May 31, 2017 at 10:45:09AM +, Reshetova, Elena wrote:
>
>> > +static inline __must_check bool refcount_add_not_zero(unsigned int i,
>> > +
>> > refcount_t *r)
>> > +{
>> > + return atomic_add_return(i, >refs) != 0;
On Wed, May 31, 2017 at 10:45:09AM +, Reshetova, Elena wrote:
> > +static inline __must_check bool refcount_add_not_zero(unsigned int i,
> > +
> > refcount_t *r)
> > +{
> > + return atomic_add_return(i, >refs) != 0;
> > +}
>
> Maybe atomic_add_unless(>refs, i, 0) in order to be
On Wed, May 31, 2017 at 10:45:09AM +, Reshetova, Elena wrote:
> > +static inline __must_check bool refcount_add_not_zero(unsigned int i,
> > +
> > refcount_t *r)
> > +{
> > + return atomic_add_return(i, >refs) != 0;
> > +}
>
> Maybe atomic_add_unless(>refs, i, 0) in order to be
>
> Many subsystems will not use refcount_t unless there is a way to build the
> kernel so that there is no regression in speed compared to atomic_t. This
> adds CONFIG_REFCOUNT_FULL to enable the full refcount_t implementation
> which has the validation but is slightly slower. When not enabled,
>
> Many subsystems will not use refcount_t unless there is a way to build the
> kernel so that there is no regression in speed compared to atomic_t. This
> adds CONFIG_REFCOUNT_FULL to enable the full refcount_t implementation
> which has the validation but is slightly slower. When not enabled,
Many subsystems will not use refcount_t unless there is a way to build the
kernel so that there is no regression in speed compared to atomic_t. This
adds CONFIG_REFCOUNT_FULL to enable the full refcount_t implementation
which has the validation but is slightly slower. When not enabled,
refcount_t
Many subsystems will not use refcount_t unless there is a way to build the
kernel so that there is no regression in speed compared to atomic_t. This
adds CONFIG_REFCOUNT_FULL to enable the full refcount_t implementation
which has the validation but is slightly slower. When not enabled,
refcount_t
8 matches
Mail list logo