From: Eric Dumazet <eric.dumazet@gmail.com>
To: Octavian Purdila <opurdila@ixiacom.com>
Cc: netdev@vger.kernel.org,
Lucian Adrian Grijincu <lucian.grijincu@gmail.com>,
Vlad Dogaru <ddvlad@rosedu.org>
Subject: Re: [PATCH net-next-2.6] net: add dev_close_many
Date: Mon, 13 Dec 2010 17:52:25 +0100 [thread overview]
Message-ID: <1292259145.2759.55.camel@edumazet-laptop> (raw)
In-Reply-To: <1292249903-3865-1-git-send-email-opurdila@ixiacom.com>
Le lundi 13 décembre 2010 à 16:18 +0200, Octavian Purdila a écrit :
> Add dev_close_many and dev_deactivate_many to factorize another
> expensive sync-rcu operation in the netdevice unregister path.
>
> $ modprobe dummy numdummies=10000
> $ ip link set dev dummy* up
> $ time rmmod dummy
>
> Without the patch With the patch
>
> real 0m 24.63s real 0m 5.15s
> user 0m 0.00s user 0m 0.00s
> sys 0m 6.05s sys 0m 5.14s
>
> Signed-off-by: Octavian Purdila <opurdila@ixiacom.com>
> ---
Hmm, I think this solves the "rmmod dummy" case, but not the "dismantle
devices one by one", which is the general one (on heavy duty tunnels/ppp
servers)
I think we could use a kernel thread (a workqueue presumably), handling
3 lists of devices to be dismantled, respecting one rcu grace period (or
rcu_barrier()) before transfert of one item from one list to following
one.
This way, each device removal could post a device to this kernel thread
and return to user immediately. Time of RTNL hold would be reduced
(calls to synchronize_rcu() would be done with RTNL not held)
next prev parent reply other threads:[~2010-12-13 16:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-13 14:18 [PATCH net-next-2.6] net: add dev_close_many Octavian Purdila
2010-12-13 16:52 ` Eric Dumazet [this message]
2010-12-13 17:23 ` Octavian Purdila
2010-12-13 17:32 ` Stephen Hemminger
2010-12-13 17:52 ` Octavian Purdila
2010-12-13 18:04 ` Stephen Hemminger
2010-12-13 20:54 ` Octavian Purdila
2010-12-13 23:34 ` Stephen Hemminger
2010-12-13 17:54 ` 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=1292259145.2759.55.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=ddvlad@rosedu.org \
--cc=lucian.grijincu@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=opurdila@ixiacom.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox