From: Octavian Purdila <opurdila@ixiacom.com>
To: nicolas.dichtel@6wind.com
Cc: Eric Dumazet <eric.dumazet@gmail.com>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] ipv4: remove all rt cache entries on UNREGISTER event
Date: Tue, 28 Sep 2010 20:35:52 +0300 [thread overview]
Message-ID: <201009282035.53148.opurdila@ixiacom.com> (raw)
In-Reply-To: <1285691629.3154.80.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tuesday 28 September 2010, 19:33:49
> Le mardi 28 septembre 2010 à 17:24 +0200, Nicolas Dichtel a écrit :
> > Hi,
> >
> > I face a problem when I try to remove an interface,
> > netdev_wait_allrefs() complains about refcount.
> >
> > Here is a trivial scenario to reproduce the problem:
> > # ip tunnel add mode ipip remote 10.16.0.164 local 10.16.0.72 dev eth0
> > # ./a.out tunl1
> > # ip tunnel del tunl1
> >
> > Note: a.out binary create an IPv4 raw socket, attach it to tunl1
> > (SO_BINDTODEVICE), set it as multicast (IP_MULTICAST_LOOP), set the
> > multicast interface to tunl1 (IP_MULTICAST_IF), build the IP header
> > (IP_HDRINCL) and then send a single packet (192.168.6.1 -> 224.0.0.18).
> >
> > Note2: when a.out is executed, tunl1 has no ip address and is down.
>
> CC Octavian Purdila, the patch author.
>
> I am just wondering why this route is created in the first place.
>
> Maybe a fix would be to forbid this ?
>
> Some machines have a giant route cache, so its very important to avoid
> expensive scans.
>
> > Then, I got a serie of "kernel:[1206699.728010] unregister_netdevice:
> > waiting for tunl1 to become free. Usage count = 3" and after some time,
> > interface is removed.
> >
> > The problem is that route cache entries are only invalidate on
> > UNREGISTER event, and not removed (introduced by commit
> > e2ce146848c81af2f6d42e67990191c284bf0c33). We must wait that
> > rt_check_expire() remove the remaining route cache entries.
> >
> > To fix the problem, I propose to remove a part of the previous commit.
> >
Hi Nicolas,
The purpose of my original patch was to speed up interfaces deregistration
even more after Eric's batch work. Reverting it might slow things down again,
but since this is breaking things we should probably revert it and think a
proper optimization afterward. I know that Eric B has done some more work in
this area, for batch namespace cleanup, maybe the issue is not even there
anymore.
So, Ack from me.
We might even fully revert the patch, since the bit that is left doesn't have
any value anymore.
Thanks,
tavi
prev parent reply other threads:[~2010-09-28 17:51 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 15:24 [PATCH] ipv4: remove all rt cache entries on UNREGISTER event Nicolas Dichtel
2010-09-28 16:33 ` Eric Dumazet
2010-09-28 16:45 ` Nicolas Dichtel
2010-09-28 16:56 ` Eric Dumazet
2010-09-29 7:49 ` Nicolas Dichtel
2010-09-29 8:35 ` Eric Dumazet
2010-09-29 9:18 ` Eric Dumazet
2010-09-30 11:49 ` Nicolas Dichtel
2010-12-22 8:32 ` Nicolas Dichtel
2010-12-22 9:55 ` Eric Dumazet
2010-12-22 10:07 ` Eric Dumazet
2010-12-22 13:43 ` Nicolas Dichtel
2010-12-22 14:39 ` [PATCH] ipv4: dont create routes on down devices Eric Dumazet
2010-12-23 8:50 ` Octavian Purdila
2010-12-26 4:05 ` David Miller
2010-09-28 17:35 ` Octavian Purdila [this message]
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=201009282035.53148.opurdila@ixiacom.com \
--to=opurdila@ixiacom.com \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.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 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.