Messages in this thread | | | Date | Thu, 9 Nov 2023 10:31:52 +0100 | From | Peter Zijlstra <> | Subject | Re: [PATCH 2/3] refcount: introduce __refcount_dec_and_lock macro |
| |
On Mon, Nov 06, 2023 at 02:11:37PM -0500, Alexander Aring wrote: > This patch adds the __refcount_dec_and_lock macro to generate code for a > lock specific refcount_dec_and_lock implementation. Existing > refcount_dec_and_lock implementation are updated to use the new > __refcount_dec_and_lock macro. In future other lock implementation can > added to use the refcount_dec_and_lock trick to only hold the lock when > the refcount is going to be zero. Per subsystem own lock implementation > can use the macro as well to provide such implementation for their own > locking type. > > Co-developed: Peter Zijlstra <peterz@infradead.org> > Signed-off-by: Alexander Aring <aahringo@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
| |