Skip to content

RFC bonding: get rid of bond->lock

Nikolay Aleksandrov netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5bonding: 3ad: use curr_slave_lock instead of bond->lockdrivers/net/bonding/bond_3ad.c drivers/net/bonding/bond_main.c+11 -104 replies
2/5bonding: alb: clean bond->lockdrivers/net/bonding/bond_alb.c+2 -90 replies
3/5bonding: procfs: clean bond->lock usage and use RTNLdrivers/net/bonding/bond_procfs.c+2 -60 replies
4/5bonding: options: remove bond->lock usagedrivers/net/bonding/bond_options.c+1 -180 replies
5/5bonding: remove last users of bond->lock and bond->lock itselfdrivers/net/bonding/bond_main.c drivers/net/bonding/bonding.h+2 -450 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC net-next 0/5] bonding: get rid of bond->lock

Hi all,
This is only a raw version of the idea, I've only compile-tested this patch-set but I think it's possible to remove bond->lock completely as its current users are only few and can be either removed or converted. I'm sending it early as RFC to see if you have any suggestions, comments or objections, and I'll do stress-testing and lockdep next week and resubmit it with any changes/fixes that come up in the process.

If this gets accepted in some form, a re-work of curr_slave_lock will be following as it can be dropped in a lot of places and only kept to sync the few users that actually need it (e.g. 3ad wq handler and slave release, alb wq handler and active change etc).
The goal of these patchsets is to simplify bond locking as it's getting more convoluted and unnecessarily complex, in most of the cases we should be able to rely on RTNL or rcu alone, and if the case is more complex we should explain/document well why we need another lock.

Best regards,
Nikolay Aleksandrov

Nikolay Aleksandrov (5):
bonding: 3ad: use curr_slave_lock instead of bond->lock
bonding: alb: clean bond->lock
bonding: procfs: clean bond->lock usage and use RTNL
bonding: options: remove bond->lock usage
bonding: remove last users of bond->lock and bond->lock itself

 drivers/net/bonding/bond_3ad.c     |  9 +++----
 drivers/net/bonding/bond_alb.c     | 11 ++------
 drivers/net/bonding/bond_main.c    | 51 ++++++--------------------------------
 drivers/net/bonding/bond_options.c | 19 +-------------
 drivers/net/bonding/bond_procfs.c  |  8 ++----
 drivers/net/bonding/bonding.h      |  8 ++----
 6 files changed, 18 insertions(+), 88 deletions(-)
Signature · 1 line
1.9.3