RE: [PATCH 14/15] futex: convert futex_pi_state.refcount to refcount_t
From: Reshetova, Elena
Date: Mon Oct 23 2017 - 03:37:27 EST
> On Fri, 20 Oct 2017, Reshetova, Elena wrote:
>
> > Since I am not really sure what to do with this futex patch, I will drop it
> > from the new series that I am about to send now.
> >
> > Please let me know what exactly should I do with this patch, as I wrote
> > previously I really don't understand.
>
> As Peter said:
>
> > > > Now Thomas would like you to mention the fact that refcount_t doesn't
> > > > provide the exact same ordering as the atomic_t usages it replaces and
> > > > I think it would be good if you could hand-wave an argument on why the
> > > > futex code doesn't care.
>
> So if you cannot come with a halfways reasonable argument then at least
> make it entirely clear that refcount_t is not the same as atomic_t in terms
> of ordering guarantees and you think that it does not matter but
> explicitely ask for help from the developers and maintainers to look at it.
There is another (I think better) proposal that came from Kees now:
What if we change the default refcount_t to provide the strict memory
ordering like atomic_t?
I guess the reason why Peter intially went with *_relaxed() versions of compare and
exchange loop was performance. But now when we have x86 spec. fast
implementation, maybe it is ok to make the default FULL refcount slower?
What do people think of this?
Best Regards,
Elena.
>
> Thanks,
>
> tglx
>