mbox series

[v2,net-next,00/14] rtnetlink: reduce RTNL pressure for dumps

Message ID 20240222105021.1943116-1-edumazet@google.com (mailing list archive)
Headers show
Series rtnetlink: reduce RTNL pressure for dumps | expand

Message

Eric Dumazet Feb. 22, 2024, 10:50 a.m. UTC
This series restarts the conversion of rtnl dump operations
to RCU protection, instead of requiring RTNL.

In this new attempt (prior one failed in 2011), I chose to
allow a gradual conversion of selected operations.

After this series, "ip -6 addr" and "ip -4 ro" no longer
need to acquire RTNL.

I refrained from changing inet_dump_ifaddr() and inet6_dump_addr()
to avoid merge conflicts because of two fixes in net tree.

I also started the work for "ip link" future conversion.

v2: rtnl_fill_link_ifmap() always emit IFLA_MAP (Jiri Pirko)
    Added "nexthop: allow nexthop_mpath_fill_node()
           to be called without RTNL" to avoid a lockdep splat (Ido Schimmel)

Eric Dumazet (14):
  rtnetlink: prepare nla_put_iflink() to run under RCU
  ipv6: prepare inet6_fill_ifla6_attrs() for RCU
  ipv6: prepare inet6_fill_ifinfo() for RCU protection
  ipv6: use xarray iterator to implement inet6_dump_ifinfo()
  netlink: fix netlink_diag_dump() return value
  netlink: hold nlk->cb_mutex longer in __netlink_dump_start()
  rtnetlink: change nlk->cb_mutex role
  rtnetlink: add RTNL_FLAG_DUMP_UNLOCKED flag
  ipv6: switch inet6_dump_ifinfo() to RCU protection
  inet: allow ip_valid_fib_dump_req() to be called with RTNL or RCU
  nexthop: allow nexthop_mpath_fill_node() to be called without RTNL
  inet: switch inet_dump_fib() to RCU protection
  rtnetlink: make rtnl_fill_link_ifmap() RCU ready
  rtnetlink: provide RCU protection to rtnl_fill_prop_list()

 drivers/infiniband/ulp/ipoib/ipoib_main.c     |   4 +-
 drivers/net/can/vxcan.c                       |   2 +-
 .../net/ethernet/qualcomm/rmnet/rmnet_vnd.c   |   2 +-
 drivers/net/ipvlan/ipvlan_main.c              |   2 +-
 drivers/net/macsec.c                          |   2 +-
 drivers/net/macvlan.c                         |   2 +-
 drivers/net/netkit.c                          |   2 +-
 drivers/net/veth.c                            |   2 +-
 drivers/net/wireless/virtual/virt_wifi.c      |   2 +-
 include/linux/netdevice.h                     |   6 +-
 include/linux/netlink.h                       |   2 +
 include/net/ip_fib.h                          |   1 +
 include/net/nexthop.h                         |   2 +-
 include/net/rtnetlink.h                       |   1 +
 net/8021q/vlan_dev.c                          |   4 +-
 net/core/dev.c                                |   6 +-
 net/core/rtnetlink.c                          |  36 +--
 net/dsa/user.c                                |   2 +-
 net/ieee802154/6lowpan/core.c                 |   2 +-
 net/ipv4/fib_frontend.c                       |  50 ++--
 net/ipv4/fib_trie.c                           |   4 +-
 net/ipv4/ipmr.c                               |   4 +-
 net/ipv6/addrconf.c                           | 222 +++++++++---------
 net/ipv6/ip6_fib.c                            |   7 +-
 net/ipv6/ip6_tunnel.c                         |   2 +-
 net/ipv6/ip6mr.c                              |   4 +-
 net/ipv6/ndisc.c                              |   2 +-
 net/mpls/af_mpls.c                            |   4 +-
 net/netlink/af_netlink.c                      |  46 ++--
 net/netlink/af_netlink.h                      |   5 +-
 net/netlink/diag.c                            |   2 +-
 net/xfrm/xfrm_interface_core.c                |   2 +-
 32 files changed, 238 insertions(+), 198 deletions(-)

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 26, 2024, 11:50 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Thu, 22 Feb 2024 10:50:07 +0000 you wrote:
> This series restarts the conversion of rtnl dump operations
> to RCU protection, instead of requiring RTNL.
> 
> In this new attempt (prior one failed in 2011), I chose to
> allow a gradual conversion of selected operations.
> 
> After this series, "ip -6 addr" and "ip -4 ro" no longer
> need to acquire RTNL.
> 
> [...]

Here is the summary with links:
  - [v2,net-next,01/14] rtnetlink: prepare nla_put_iflink() to run under RCU
    https://git.kernel.org/netdev/net-next/c/e353ea9ce471
  - [v2,net-next,02/14] ipv6: prepare inet6_fill_ifla6_attrs() for RCU
    https://git.kernel.org/netdev/net-next/c/4ad268136421
  - [v2,net-next,03/14] ipv6: prepare inet6_fill_ifinfo() for RCU protection
    https://git.kernel.org/netdev/net-next/c/8afc7a78d55d
  - [v2,net-next,04/14] ipv6: use xarray iterator to implement inet6_dump_ifinfo()
    https://git.kernel.org/netdev/net-next/c/ac14ad9755d4
  - [v2,net-next,05/14] netlink: fix netlink_diag_dump() return value
    https://git.kernel.org/netdev/net-next/c/6647b338fc5c
  - [v2,net-next,06/14] netlink: hold nlk->cb_mutex longer in __netlink_dump_start()
    https://git.kernel.org/netdev/net-next/c/b5590270068c
  - [v2,net-next,07/14] rtnetlink: change nlk->cb_mutex role
    https://git.kernel.org/netdev/net-next/c/e39951d965bf
  - [v2,net-next,08/14] rtnetlink: add RTNL_FLAG_DUMP_UNLOCKED flag
    https://git.kernel.org/netdev/net-next/c/386520e0ecc0
  - [v2,net-next,09/14] ipv6: switch inet6_dump_ifinfo() to RCU protection
    https://git.kernel.org/netdev/net-next/c/69fdb7e411b6
  - [v2,net-next,10/14] inet: allow ip_valid_fib_dump_req() to be called with RTNL or RCU
    https://git.kernel.org/netdev/net-next/c/22e36ea9f5d7
  - [v2,net-next,11/14] nexthop: allow nexthop_mpath_fill_node() to be called without RTNL
    https://git.kernel.org/netdev/net-next/c/0ac3fa0c3b36
  - [v2,net-next,12/14] inet: switch inet_dump_fib() to RCU protection
    https://git.kernel.org/netdev/net-next/c/4ce5dc9316de
  - [v2,net-next,13/14] rtnetlink: make rtnl_fill_link_ifmap() RCU ready
    https://git.kernel.org/netdev/net-next/c/74808e72e0b2
  - [v2,net-next,14/14] rtnetlink: provide RCU protection to rtnl_fill_prop_list()
    https://git.kernel.org/netdev/net-next/c/0ec4e48c3a23

You are awesome, thank you!