On 2021/5/28 15:01, Peter Zijlstra wrote: > On Fri, May 28, 2021 at 03:58:42AM +0000, liweihang wrote: >> Peter, could you please explain why you said "add_return and sub_return are >> horrible interface for refcount"? > > What would you need them for? The only special value is 0. Once you hit > 0 the object is dead and you cannot revive. >> If I look at drivers/infiniband/sw/rdmavt/mcast.c, which seems to be the > relevant file, the thing that's called ->refcount is not in fact a > reference count. > I see, thank you. refcount_t is not suitable for the current logic, so let's leave it as it is. I will drop this patch from the series. Weihang