netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] dev->refcnt long term holder
@ 2009-11-16 18:01 Eric Dumazet
  2009-11-16 19:02 ` Stephen Hemminger
  2009-11-16 21:50 ` PATCH net-next-2.6] linkwatch: linkwatch_forget_dev() to speedup device dismantle Eric Dumazet
  0 siblings, 2 replies; 13+ messages in thread
From: Eric Dumazet @ 2009-11-16 18:01 UTC (permalink / raw)
  To: David S. Miller, Herbert Xu, Stephen Hemminger; +Cc: Linux Netdev List

time ip link del eth3.103 ; time ip link del eth3.104 ; time ip link del eth3.105

real	0m0.266s
user	0m0.000s
sys	0m0.001s

real	0m0.770s
user	0m0.000s
sys	0m0.000s

real	0m1.022s
user	0m0.000s
sys	0m0.000s


One problem of current schem in vlan dismantle phase is the
holding of device done by following chain :

vlan_dev_stop() ->
	netif_carrier_off(dev) ->
		linkwatch_fire_event(dev) ->
			dev_hold() ...

And __linkwatch_run_queue() run up to one second later...

Is following patch one way to avoid the problem, or should
we add a new linkwatch_forgetpro_device(dev) method to immediately
release the device reference (and unlink device from the list) ?
(This would probably need a doubly linked list instead of single link list)

Thanks

diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 4198ec5..17216f9 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -512,7 +512,6 @@ static int vlan_dev_stop(struct net_device *dev)
 	if (compare_ether_addr(dev->dev_addr, real_dev->dev_addr))
 		dev_unicast_delete(real_dev, dev->dev_addr);
 
-	netif_carrier_off(dev);
 	return 0;
 }
 

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-11-18 13:05 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-16 18:01 [RFC] dev->refcnt long term holder Eric Dumazet
2009-11-16 19:02 ` Stephen Hemminger
2009-11-16 19:54   ` Eric Dumazet
2009-11-17  8:30     ` David Miller
2009-11-17  8:37       ` Herbert Xu
2009-11-17 17:58       ` Stephen Hemminger
2009-11-17 19:18         ` David Miller
2009-11-16 21:50 ` PATCH net-next-2.6] linkwatch: linkwatch_forget_dev() to speedup device dismantle Eric Dumazet
2009-11-16 22:39   ` Stephen Hemminger
2009-11-17 12:26     ` David Miller
2009-11-17 12:31       ` Herbert Xu
2009-11-17 15:59         ` Eric Dumazet
2009-11-18 13:05           ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).