Re: [PATCH net-next v2] net: convert netdev_nl_sock bindings list to xarray
Jakub Kicinski <[email protected]>
| Newsgroups | org.kernel.vger.netdev,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 14 Aug 2026 12:04:59 +0530 Shivaji Kant wrote: > I understand, my thinking for this was removing priv->lock is more > than just simplification, it can be a concurrency win. Sorry for not > making it more explicit in the patch description. > As you pointed out, priv->lock current serializes the entire doit > block (including netdev_get_by_index_lock() and the entire > net_devmem_bind_dmabuf_to_queue() loop). Furthermore, > net_devmem_unbind_dmabuf() blocks on synchronize_net(). With the > current mutex implementation, if one thread is destroying a socket or > unbinding a dmabuf, it holds priv->lock across synchronize_net(), > completely blocking any concurrent netlink commands on the same socket > (e.g., binding to a different queue/interface). > Converting to an xarray allows us to cleanly dissolve this wide > serialization scope. xa_for_each() handles the RCU grace periods > internally without holding a manual lock across synchronize_net(). I > agree the changelog must be updated to clearly state that reducing > this serialization scope is the explicit goal. If it's an optimization you have to show prod data (as in not a micro benchmark) that the problem actually exists. And please describe how your application manages the sockets, we're talking about a lock on a management socket, not some global lock blocking the whole system.