Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, ebiederm@xmission.com
Subject: Re: [RFC] NETDEV_UNREGISTER_BATCH seems unused nowaday ?
Date: Fri, 10 Aug 2012 13:06:49 +0200	[thread overview]
Message-ID: <1344596809.31104.2358.camel@edumazet-glaptop> (raw)
In-Reply-To: <20120810.034211.994338127277150687.davem@davemloft.net>

On Fri, 2012-08-10 at 03:42 -0700, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Fri, 10 Aug 2012 11:27:04 +0200
> 
> > NETDEV_UNREGISTER_BATCH seems unused we can probably remove it.
> 
> Indeed, the routing cache was the final real user.
> 
> > I am tracking a device refcount issue, delaying net device dismantle by
> > 1 second in netdev_wait_allrefs()
> > 
> > I guess we need to add a notifier called _after_ the final
> > synchronize_net() in rollback_registered_many()
> 
> It's essentially caused by DST_GC_INC, right?

No, we in fact need a rcu_barrier(), then another call to
dst_dev_event().

rcu_barrier() is needed so that in-flight call_rcu() of routes (from
rt_free()) are completed. Or else we miss these dst in the
dst_dev_event().

I have a working patch, adding the rcu_barrier() and one additional
NETDEV_UNREGISTER_FINAL event.

  reply	other threads:[~2012-08-10 11:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10  9:27 [RFC] NETDEV_UNREGISTER_BATCH seems unused nowaday ? Eric Dumazet
2012-08-10 10:42 ` David Miller
2012-08-10 11:06   ` Eric Dumazet [this message]
2012-08-10 14:45     ` Eric W. Biederman
2012-08-10 15:01       ` Eric Dumazet
2012-08-10 17:55       ` Paul E. McKenney
2012-08-10 14:46     ` [PATCH] net: remove delay at device dismantle Eric Dumazet
2012-08-10 15:42       ` [PATCH net-next v2] " Eric Dumazet
2012-08-11  5:54         ` Eric Dumazet
2012-08-11  5:57           ` David Miller
2012-08-23  2:18           ` David Miller
2012-08-23  2:25           ` Gao feng
2012-08-23  2:51             ` David Miller
2012-08-23  2:58               ` Eric Dumazet

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=1344596809.31104.2358.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox