public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Gao feng <gaofeng@cn•fujitsu.com>
To: Eric Dumazet <eric.dumazet@gmail•com>
Cc: David Miller <davem@davemloft•net>,
	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: Thu, 23 Aug 2012 12:33:03 +0800	[thread overview]
Message-ID: <5035B27F.9060002@cn.fujitsu.com> (raw)
In-Reply-To: <1345691986.5904.40.camel@edumazet-glaptop>

于 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.

  reply	other threads:[~2012-08-23  4:32 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 [this message]
2012-08-23  4:50   ` David Miller
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=5035B27F.9060002@cn.fujitsu.com \
    --to=gaofeng@cn$(echo .)fujitsu.com \
    --cc=davem@davemloft$(echo .)net \
    --cc=ebiederm@xmission$(echo .)com \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=maheshb@google$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=therbert@google$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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