Re: [PATCH net] Fix an intermittent pr_emerg warning about lo becoming free.

2017-06-09 Thread Cong Wang
On Fri, Jun 9, 2017 at 11:43 AM, Krister Johansen wrote: > On Fri, Jun 09, 2017 at 11:18:44AM -0700, Cong Wang wrote: >> On Thu, Jun 8, 2017 at 1:12 PM, Krister Johansen >> wrote: >> > The way this works is that if there's still a reference on the dst entry >> > at the time we try to free it, it

Re: [PATCH net] Fix an intermittent pr_emerg warning about lo becoming free.

2017-06-09 Thread Krister Johansen
On Fri, Jun 09, 2017 at 11:18:44AM -0700, Cong Wang wrote: > On Thu, Jun 8, 2017 at 1:12 PM, Krister Johansen > wrote: > > The way this works is that if there's still a reference on the dst entry > > at the time we try to free it, it gets placed in the gc list by > > __dst_free and the dst_destroy

Re: [PATCH net] Fix an intermittent pr_emerg warning about lo becoming free.

2017-06-09 Thread Cong Wang
On Thu, Jun 8, 2017 at 1:12 PM, Krister Johansen wrote: > After looking through the list of callbacks that the netdevice notifiers > invoke in this path, it appears that the dst_dev_event is the most > interesting. The dst_ifdown path places a hold on the loopback_dev as > part of releasing the d

Re: [PATCH net] Fix an intermittent pr_emerg warning about lo becoming free.

2017-06-09 Thread David Miller
From: Krister Johansen Date: Thu, 8 Jun 2017 13:12:38 -0700 > It looks like this: > > Message from syslogd@flamingo at Apr 26 00:45:00 ... > kernel:unregister_netdevice: waiting for lo to become free. Usage count = 4 > > They seem to coincide with net namespace teardown. > > The message is em

Re: [PATCH net] Fix an intermittent pr_emerg warning about lo becoming free.

2017-06-08 Thread Wei Wang
> Wei Wan is actually working on a patch series removing all this > dst_garbage list stuff. Yes. I am working on removing the dst garbage collector completely. dst_dev_event() will be removed from the list of callbacks that the netdevice notifiers invoke in my patch series. On Thu, Jun 8, 2017 at

Re: [PATCH net] Fix an intermittent pr_emerg warning about lo becoming free.

2017-06-08 Thread Eric Dumazet
On Thu, 2017-06-08 at 13:12 -0700, Krister Johansen wrote: ... > Looking at the gc_task intervals, they started at 663ms when we invoked > __dst_free(). After that, they increased to 1663, 3136, 5567, 8191, > 10751, and 14848. The release that set the refcnt to 0 on our dst entry > occurred aft

[PATCH net] Fix an intermittent pr_emerg warning about lo becoming free.

2017-06-08 Thread Krister Johansen
It looks like this: Message from syslogd@flamingo at Apr 26 00:45:00 ... kernel:unregister_netdevice: waiting for lo to become free. Usage count = 4 They seem to coincide with net namespace teardown. The message is emitted by netdev_wait_allrefs(). Forced a kdump in netdev_run_todo, but found