Re: [PATCH] bonding: replace system timer with work queue
- From: Stephen Hemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 28 Feb 2007 14:18:01 -0800
On Wed, 28 Feb 2007 10:12:01 +0100 (CET)
Jaroslav Kysela <perex@xxxxxxx> wrote:
Hi,
please, review and apply to mm tree for further testing. The patch
is also available at
ftp://ftp.alsa-project.org/pub/kernel-patches/bonding-workqueue.patch .
Thank you,
Jaroslav
You should submit network patches to the entry in the MAINTAINERS file.
BONDING DRIVER
P: Chad Tindel
M: ctindel@xxxxxxxxxxxxxxxxxxxxx
P: Jay Vosburgh
M: fubar@xxxxxxxxxx
L: bonding-devel@xxxxxxxxxxxxxxxxxxxxx
W: http://sourceforge.net/projects/bonding/
S: Supported
@@ -3569,20 +3552,20 @@ static int bond_close(struct net_device
*/
if (bond->params.miimon) { /* link check interval, in milliseconds. */
- del_timer_sync(&bond->mii_timer);
+ cancel_rearming_delayed_workqueue(bond_wq, &bond->mii_work);
}
if (bond->params.arp_interval) { /* arp interval, in milliseconds. */
- del_timer_sync(&bond->arp_timer);
+ cancel_rearming_delayed_workqueue(bond_wq, &bond->arp_work);
}
switch (bond->params.mode) {
case BOND_MODE_8023AD:
- del_timer_sync(&(BOND_AD_INFO(bond).ad_timer));
+ cancel_rearming_delayed_workqueue(bond_wq, &(BOND_AD_INFO(bond).ad_work));
break;
case BOND_MODE_TLB:
case BOND_MODE_ALB:
- del_timer_sync(&(BOND_ALB_INFO(bond).alb_timer));
+ cancel_rearming_delayed_workqueue(bond_wq, &(BOND_ALB_INFO(bond).alb_work));
break;
default:
break;
This part will deadlock since it is not safe to cancel a workqueue
entry with RTNL mutex held. The cancel operation has to wait for the workqueue
to run, and the entry being run maybe stuck waiting for the RTNL.
--
Stephen Hemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH] bonding: replace system timer with work queue
- From: Jaroslav Kysela
- [PATCH] bonding: replace system timer with work queue
- Prev by Date: Re: [PATCH] SLUB The unqueued slab allocator V3
- Next by Date: Re: [PATCH] vlan & net drivers: avoid a 4-order allocation
- Previous by thread: [PATCH] bonding: replace system timer with work queue
- Next by thread: [GIT PATCH] HID and USB HID update for 2.6.21-rc2
- Index(es):