Re: [PATCH RESEND net-next v2] net: devmem: convert binding refcount to percpu_ref
From: Jakub Kicinski
Date: Mon Jan 12 2026 - 21:00:40 EST
On Wed, 07 Jan 2026 17:29:38 -0800 Bobby Eshleman wrote:
> Convert net_devmem_dmabuf_binding refcount from refcount_t to percpu_ref
> to optimize common-case reference counting on the hot path.
>
> The typical devmem workflow involves binding a dmabuf to a queue
> (acquiring the initial reference on binding->ref), followed by
> high-volume traffic where every skb fragment acquires a reference.
> Eventually traffic stops and the unbind operation releases the initial
> reference. Additionally, the high traffic hot path is often multi-core.
> This access pattern is ideal for percpu_ref as the first and last
> reference during bind/unbind normally book-ends activity in the hot
> path.
Applied, thanks!