RE: [PATCH 01/15] sched: convert sighand_struct.count to refcount_t
From: Thomas Gleixner
Date: Mon Oct 23 2017 - 06:26:59 EST
On Mon, 23 Oct 2017, Reshetova, Elena wrote:
> > On Fri, 20 Oct 2017, Elena Reshetova wrote:
> > How did you make sure that these atomic operations have no other
> > serialization effect and can be replaced with refcount?
>
> What serialization effects? Are you taking about smth else than memory
> ordering?
Well, the memory ordering constraints can be part of serialization
mechanisms. Unfortunately they are not well documented ....
> For memory ordering my current hope is that we can just make refcount_t
> to use same strict atomic primitives and then it would not make any
> difference. I think this would be the simplest way for everyone since I
> think even some maintainers are having issues understanding all the
> implications of "relaxed" ordering.
Well, that would make indeed the conversion simpler because then it is just
a drop in replacement. Albeit there might be some places which benefit of
the relaxed ordering as on some architectures strict ordering is expensive.
Thanks,
tglx