Re: [PATCH 4/4] bonding: Fix some RTNL taking

2008-01-18 Thread Makito SHIOKAWA
Probably the difference is not much, but since this all double locking, unlocking and something between could take a while, and such a check looks cheaper than re-queueing... But I don't persist in this. Looks like this one is settled, thank you for your advice! -- Makito SHIOKAWA MIRACLE LINUX

Re: [PATCH 4/4] bonding: Fix some RTNL taking

2008-01-17 Thread Jarek Poplawski
On Thu, Jan 17, 2008 at 02:30:37PM +0900, Makito SHIOKAWA wrote: Maybe I'm wrong, but since this read_lock() is given and taken anyway, it seems this looks a bit better to me (why hold this rtnl longer than needed?): read_unlock(bond-lock); rtnl_unlock();

Re: [PATCH 4/4] bonding: Fix some RTNL taking

2008-01-16 Thread Jarek Poplawski
On 15-01-2008 07:36, Makito SHIOKAWA wrote: Fix some RTNL lock taking: * RTNL (mutex; may sleep) must not be taken under read_lock (spinlock; must be atomic). However, RTNL is taken under read_lock in bond_loadbalance_arp_mon() and bond_activebackup_arp_mon(). So change code to take RTNL

Re: [PATCH 4/4] bonding: Fix some RTNL taking

2008-01-16 Thread Makito SHIOKAWA
Maybe I'm wrong, but since this read_lock() is given and taken anyway, it seems this looks a bit better to me (why hold this rtnl longer than needed?): read_unlock(bond-lock); rtnl_unlock(); read_lock(bond-lock); Seems better. On the other hand,

[PATCH 4/4] bonding: Fix some RTNL taking

2008-01-14 Thread Makito SHIOKAWA
Fix some RTNL lock taking: * RTNL (mutex; may sleep) must not be taken under read_lock (spinlock; must be atomic). However, RTNL is taken under read_lock in bond_loadbalance_arp_mon() and bond_activebackup_arp_mon(). So change code to take RTNL outside of read_lock. * rtnl_unlock() calls