From: Stephen Hemminger <shemminger@vyatta.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Herbert Xu <herbert@gondor.apana.org.au>,
Linux Netdev List <netdev@vger.kernel.org>
Subject: Re: PATCH net-next-2.6] linkwatch: linkwatch_forget_dev() to speedup device dismantle
Date: Mon, 16 Nov 2009 14:39:17 -0800 [thread overview]
Message-ID: <20091116143917.14e4fa4f@s6510> (raw)
In-Reply-To: <4B01C938.8000705@gmail.com>
On Mon, 16 Nov 2009 22:50:48 +0100
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> vlan_dev_stop() ->
> netif_carrier_off(dev) ->
> linkwatch_fire_event(dev) ->
> dev_hold() ...
>
> And __linkwatch_run_queue() runs up to one second later...
>
> A generic fix to this problem is to add a linkwatch_forget_dev() method
> to unlink the device from the list of watched devices.
>
> dev->link_watch_next becomes dev->link_watch_list (and use a bit more memory),
> to be able to unlink device in O(1).
>
> After patch :
> time ip link del eth3.103 ; time ip link del eth3.104 ; time ip link del eth3.105
>
> real 0m0.024s
> user 0m0.000s
> sys 0m0.000s
>
> real 0m0.032s
> user 0m0.000s
> sys 0m0.001s
>
> real 0m0.033s
> user 0m0.000s
> sys 0m0.000s
>
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
next prev parent reply other threads:[~2009-11-16 22:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091116143917.14e4fa4f@s6510 \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.