From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarno Rajahalme Subject: Re: Long delays creating a netns after deleting one (possibly RCU related) Date: Thu, 17 Nov 2016 16:31:19 -0800 Message-ID: <5697DF47-5CCB-41F3-9BD1-62DE42AD61B8@gmail.com> References: <20161110212404.GB4127@linux.vnet.ibm.com> <20161112002347.GL4127@linux.vnet.ibm.com> <20161114162417.GJ4127@linux.vnet.ibm.com> <20161114181425.GN4127@linux.vnet.ibm.com> <87y40lhfrt.fsf@xmission.com> <1479163571.8455.83.camel@edumazet-glaptop3.roam.corp.google.com> <1479164967.8455.87.camel@edumazet-glaptop3.roam.corp.google.com> Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Cc: "Eric W. Biederman" , "Paul E. McKenney" , Cong Wang , Rolf Neugebauer , LKML , Linux Kernel Network Developers , Justin Cormack , Ian Campbell , Eric Dumazet To: Eric Dumazet Return-path: In-Reply-To: <1479164967.8455.87.camel@edumazet-glaptop3.roam.corp.google.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org > On Nov 14, 2016, at 3:09 PM, Eric Dumazet = wrote: >=20 > On Mon, 2016-11-14 at 14:46 -0800, Eric Dumazet wrote: >> On Mon, 2016-11-14 at 16:12 -0600, Eric W. Biederman wrote: >>=20 >>> synchronize_rcu_expidited is not enough if you have multiple network >>> devices in play. >>>=20 >>> Looking at the code it comes down to this commit, and it appears = there >>> is a promise add rcu grace period combining by Eric Dumazet. >>>=20 >>> Eric since people are hitting noticable stalls because of the rcu = grace >>> period taking a long time do you think you could look at this code = path >>> a bit more? >>>=20 >>> commit 93d05d4a320cb16712bb3d57a9658f395d8cecb9 >>> Author: Eric Dumazet >>> Date: Wed Nov 18 06:31:03 2015 -0800 >>=20 >> Absolutely, I will take a loop asap. >=20 > The worst offender should be fixed by the following patch. >=20 > busy poll needs to poll the physical device, not a virtual one... >=20 > diff --git a/include/net/gro_cells.h b/include/net/gro_cells.h > index = d15214d673b2e8e08fd6437b572278fb1359f10d..2a1abbf8da74368cd01adc40cef6c064= 4e059ef2 100644 > --- a/include/net/gro_cells.h > +++ b/include/net/gro_cells.h > @@ -68,6 +68,9 @@ static inline int gro_cells_init(struct gro_cells = *gcells, struct net_device *de > struct gro_cell *cell =3D per_cpu_ptr(gcells->cells, i); >=20 > __skb_queue_head_init(&cell->napi_skbs); > + > + set_bit(NAPI_STATE_NO_BUSY_POLL, &cell->napi.state); > + > netif_napi_add(dev, &cell->napi, gro_cell_poll, 64); > napi_enable(&cell->napi); > } >=20 This solved a ~20 second slowdown between OVS datapath unit tests for = me. Jarno