Lets say I have a percpu_ref
structure which I had initialized and have been using, you know put
and get
on it.
Is it possible to do a read on the count
? Something like,
atomic_long_read(&this_percpu_ref.count);
Because of the way percpu_ref
structures are, (per-CPU array of reference counters), doing a read would mean that it has to sum up the count of all those counters, which would then cause cache-line bouncing.