mbox series

[net-next,v2,00/11] net: skip taking rtnl_lock for queue GET

Message ID 20250324224537.248800-1-kuba@kernel.org (mailing list archive)
Headers show
Series net: skip taking rtnl_lock for queue GET | expand

Message

Jakub Kicinski March 24, 2025, 10:45 p.m. UTC
Skip taking rtnl_lock for queue GET ops on devices which opt
into running all ops under the instance lock.

This fixes and completes Stan's ops-locking work, so I think
for sanity / ease of backporting fixes we should merge it for
v6.15.

v2:
 - rebase
 - only clear XSK if netdev still set
v1: https://lore.kernel.org/20250312223507.805719-1-kuba@kernel.org

Jakub Kicinski (11):
  net: bubble up taking netdev instance lock to callers of
    net_devmem_unbind_dmabuf()
  net: remove netif_set_real_num_rx_queues() helper for when SYSFS=n
  net: constify dev pointer in misc instance lock helpers
  net: explain "protection types" for the instance lock
  net: designate queue counts as "double ops protected" by instance lock
  net: designate queue -> napi linking as "ops protected"
  net: protect rxq->mp_params with the instance lock
  net: make NETDEV_UNREGISTER and instance lock more consistent
  net: designate XSK pool pointers in queues as "ops protected"
  netdev: add "ops compat locking" helpers
  netdev: don't hold rtnl_lock over nl queue info get when possible

 include/linux/netdevice.h     | 41 ++++++++++++---------
 include/net/netdev_lock.h     | 36 ++++++++++++++++--
 include/net/netdev_rx_queue.h |  6 +--
 net/core/dev.h                | 15 ++++++++
 net/core/dev.c                | 69 +++++++++++++++++++++++++++++++----
 net/core/devmem.c             |  2 -
 net/core/net-sysfs.c          |  2 +
 net/core/netdev-genl.c        | 27 ++++++++------
 net/core/netdev_rx_queue.c    |  3 ++
 net/core/page_pool.c          |  7 +---
 net/xdp/xsk_buff_pool.c       |  7 +++-
 11 files changed, 165 insertions(+), 50 deletions(-)

Comments

Stanislav Fomichev March 25, 2025, 4:04 a.m. UTC | #1
On 03/24, Jakub Kicinski wrote:
> Skip taking rtnl_lock for queue GET ops on devices which opt
> into running all ops under the instance lock.
> 
> This fixes and completes Stan's ops-locking work, so I think
> for sanity / ease of backporting fixes we should merge it for
> v6.15.
> 
> v2:
>  - rebase
>  - only clear XSK if netdev still set
> v1: https://lore.kernel.org/20250312223507.805719-1-kuba@kernel.org

Acked-by: Stanislav Fomichev <sdf@fomichev.me>
patchwork-bot+netdevbpf@kernel.org March 25, 2025, 5:30 p.m. UTC | #2
Hello:

This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 24 Mar 2025 15:45:26 -0700 you wrote:
> Skip taking rtnl_lock for queue GET ops on devices which opt
> into running all ops under the instance lock.
> 
> This fixes and completes Stan's ops-locking work, so I think
> for sanity / ease of backporting fixes we should merge it for
> v6.15.
> 
> [...]

Here is the summary with links:
  - [net-next,v2,01/11] net: bubble up taking netdev instance lock to callers of net_devmem_unbind_dmabuf()
    https://git.kernel.org/netdev/net-next/c/ba6f418fbf64
  - [net-next,v2,02/11] net: remove netif_set_real_num_rx_queues() helper for when SYSFS=n
    https://git.kernel.org/netdev/net-next/c/bae2da826196
  - [net-next,v2,03/11] net: constify dev pointer in misc instance lock helpers
    https://git.kernel.org/netdev/net-next/c/e2f81e8f4d0c
  - [net-next,v2,04/11] net: explain "protection types" for the instance lock
    (no matching commit)
  - [net-next,v2,05/11] net: designate queue counts as "double ops protected" by instance lock
    https://git.kernel.org/netdev/net-next/c/0a65dcf6249b
  - [net-next,v2,06/11] net: designate queue -> napi linking as "ops protected"
    https://git.kernel.org/netdev/net-next/c/310ae9eb2617
  - [net-next,v2,07/11] net: protect rxq->mp_params with the instance lock
    https://git.kernel.org/netdev/net-next/c/b52458652eca
  - [net-next,v2,08/11] net: make NETDEV_UNREGISTER and instance lock more consistent
    (no matching commit)
  - [net-next,v2,09/11] net: designate XSK pool pointers in queues as "ops protected"
    (no matching commit)
  - [net-next,v2,10/11] netdev: add "ops compat locking" helpers
    (no matching commit)
  - [net-next,v2,11/11] netdev: don't hold rtnl_lock over nl queue info get when possible
    (no matching commit)

You are awesome, thank you!