From: David Miller <davem@davemloft.net>
To: gaofeng@cn.fujitsu.com
Cc: eric.dumazet@gmail.com, netdev@vger.kernel.org,
maheshb@google.com, therbert@google.com, ebiederm@xmission.com
Subject: Re: [PATCH net-next v3] net: remove delay at device dismantle
Date: Wed, 22 Aug 2012 21:50:54 -0700 (PDT) [thread overview]
Message-ID: <20120822.215054.1560262447672200871.davem@davemloft.net> (raw)
In-Reply-To: <5035B27F.9060002@cn.fujitsu.com>
From: Gao feng <gaofeng@cn.fujitsu.com>
Date: Thu, 23 Aug 2012 12:33:03 +0800
> 于 2012年08月23日 11:19, Eric Dumazet 写道:
>> From: Eric Dumazet <edumazet@google.com>
>>
>> I noticed extra one second delay in device dismantle, tracked down to
>> a call to dst_dev_event() while some call_rcu() are still in RCU queues.
>>
>> These call_rcu() were posted by rt_free(struct rtable *rt) calls.
>>
>> We then wait a little (but one second) in netdev_wait_allrefs() before
>> kicking again NETDEV_UNREGISTER.
>>
>> As the call_rcu() are now completed, dst_dev_event() can do the needed
>> device swap on busy dst.
>>
>> To solve this problem, add a new NETDEV_UNREGISTER_FINAL, called
>> after a rcu_barrier(), but outside of RTNL lock.
>>
>> Use NETDEV_UNREGISTER_FINAL with care !
>>
>> Change dst_dev_event() handler to react to NETDEV_UNREGISTER_FINAL
>>
>> Also remove NETDEV_UNREGISTER_BATCH, as its not used anymore after
>> IP cache removal.
>>
>> With help from Gao feng
>>
>> Signed-off-by: Eric Dumazet <edumazet@google.com>
>> Cc: Tom Herbert <therbert@google.com>
>> Cc: Mahesh Bandewar <maheshb@google.com>
>> Cc: "Eric W. Biederman" <ebiederm@xmission.com>
>> Cc: Gao feng <gaofeng@cn.fujitsu.com>
>
> looks good to me, the lockdep warning message disappeared.
Applied, thanks everyone.
next prev parent reply other threads:[~2012-08-23 4:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-23 3:19 [PATCH net-next v3] net: remove delay at device dismantle Eric Dumazet
2012-08-23 4:33 ` Gao feng
2012-08-23 4:50 ` David Miller [this message]
2012-08-23 6:34 ` Eric W. Biederman
2012-08-23 7:00 ` Eric Dumazet
2012-08-23 18:21 ` Ben Hutchings
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=20120822.215054.1560262447672200871.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=eric.dumazet@gmail.com \
--cc=gaofeng@cn.fujitsu.com \
--cc=maheshb@google.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.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;
as well as URLs for NNTP newsgroup(s).