Thread (19 messages) 19 messages, 4 authors, 2021-05-28

Re: [PATCH v3 for-next 13/13] RDMA/rdmavt: Use refcount_t instead of atomic_t on refcount of rvt_mcast

From: Peter Zijlstra <peterz@infradead.org>
Date: 2021-05-28 07:01:40

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help