linux/drivers/net/bonding
dingtianhong 4cb4f97b7e bonding: rebuild the lock use for bond_mii_monitor()
The bond_mii_monitor() still use bond lock to protect bond slave list,
it is no effect, I have 2 way to fix the problem, move the RTNL to the
top of the function, or add RCU to protect the bond slave list,
according to the Jay Vosburgh's opinion, 10 times one second is a
truely big performance loss if use RTNL to protect the whole monitor,
so I would take the advice and use RCU to protect the bond slave list.

The bond_has_slave() will not protect by anything, there will no things
happen if the slave list is be changed, unless the bond was free, but
it will not happened before the monitor, the bond will closed before
be freed.

The peers notify for the bond will calling curr_active_slave, so
derefence the slave to make sure we will accessing the same slave
if the curr_active_slave changed, as the rcu dereference need in
read-side critical sector and bond_change_active_slave() will call
it with no RCU hold,  so add peer notify in rcu_read_lock which
will be nested in monitor.

Suggested-by: Jay Vosburgh <fubar@us.ibm.com>
Suggested-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-14 01:58:01 -05:00
..
bond_3ad.c Revert "Merge branch 'bonding_monitor_locking'" 2013-10-28 00:11:22 -04:00
bond_3ad.h bonding: fix multiple 3ad mode sysfs race conditions 2013-05-19 23:25:49 -07:00
bond_alb.c bonding: remove the no effect lock for bond_select_active_slave() 2013-12-14 01:58:01 -05:00
bond_alb.h drivers/net/*: Fix FSF address in file headers 2013-12-06 12:37:55 -05:00
bond_debugfs.c bonding: delete migrated IP addresses from the rlb hash table 2012-11-30 12:07:27 -05:00
bond_main.c bonding: rebuild the lock use for bond_mii_monitor() 2013-12-14 01:58:01 -05:00
bond_netlink.c bonding: add arp_all_targets netlink support 2013-12-14 01:07:32 -05:00
bond_options.c bonding: add arp_all_targets netlink support 2013-12-14 01:07:32 -05:00
bond_procfs.c bonding: don't use bond_next_slave() in bond_info_seq_next() 2013-09-28 15:28:06 -07:00
bond_sysfs.c bonding: add arp_all_targets netlink support 2013-12-14 01:07:32 -05:00
bonding.h bonding: add arp_all_targets netlink support 2013-12-14 01:07:32 -05:00
Makefile bonding: move mode setting into separate function 2013-10-19 18:58:45 -04:00