On Mon, 2018-08-06 at 10:18 -0700, Tejun Heo wrote: +AD4- I'm worried that this is too inviting for misuses and subtle problems. +AD4- For example, your patch which uses this function uses +AD4- synchronize+AF8-rcu() to synchronize against per-cpu counts after the +AD4- first snoop+ADs- however, percpu+AF8-ref uses sched rcu, not the regular one, +AD4- so depending on the config, this will lead to +ACo-really+ACo- subtle +AD4- failures. Even if that gets fixed, it's still leaking percpu-ref +AD4- internal details to its users - details which may change in the future +AD4- and will cause super subtle bugs. +AD4- +AD4- I'd go for something a lot more specific, like percpu+AF8-ref+AF8-is+AF8-one(), so +AD4- that all the magics can be contained in percpu-ref implementation +AD4- proper. Hi Tejun, Can you have a look at the new percpu+AF8-ref+AF8-is+AF8-in+AF8-use() function? Please also note that the synchronize+AF8-rcu() call between the two percpu+AF8-ref+AF8-is+AF8-in+AF8-use() calls is not related to the use of RCU in the per-cpu refcount implementation. Thanks, Bart.