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: liweihang <hidden>
Date: 2021-05-28 08:22:09

On 2021/5/28 15:01, Peter Zijlstra wrote:
On Fri, May 28, 2021 at 03:58:42AM +0000, liweihang wrote:
quoted
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.
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help