Re: [PATCH] bonding: change spinlocks and remove timers in favor of workqueues
From: Jay Vosburgh <hidden>
Date: 2006-11-30 19:38:48
Andy Gospodarek [off-list ref] wrote:
The main purpose of this patch is to clean-up the bonding code so that several important operations are not done in the incorrect (softirq) context. Whenever a kernel is compiled with CONFIG_DEBUG_SPINLOCK_SLEEP all sorts of backtraces are spewed to the log since might_sleep will kindly remind us we are doing something in a atomic context when we probably should not.
[...] I'll look at the patch in detail in a bit (and I have 802.3ad switches to test on), but on first glance, does this not still hold a lock during failover operations in balance-alb mode? I.e., this doesn't change the locking model, it just moves the timers to workqueues and relaxes the _bh locking. The really problematic case calls dev_set_mac_address() with a lock held, and I don't see that this patch changes that behavior. Do you still get the lock warnings during link fail / recovery in balance-alb mode? Also, on an CONFIG_PREEMPT kernel, it'll still get the sleep warnings, since in_atomic() will trip __might_sleep() for any lock (if I'm reading things correctly). Don't get me wrong, this (switching to workqueues, etc) needs to be done, but I don't think this patch really resolves the underlying problem that causes the warnings. Let me see if I can dust off the extensive patch that does change the locking model; I'll see if I can bring it up to the current git and post it. -J --- -Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com