From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932273AbcKSAiM (ORCPT ); Fri, 18 Nov 2016 19:38:12 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:34731 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752842AbcKSAiI (ORCPT ); Fri, 18 Nov 2016 19:38:08 -0500 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Long delays creating a netns after deleting one (possibly RCU related) From: Jarno Rajahalme In-Reply-To: <1479164967.8455.87.camel@edumazet-glaptop3.roam.corp.google.com> Date: Fri, 18 Nov 2016 16:38:05 -0800 Cc: "Eric W. Biederman" , "Paul E. McKenney" , Cong Wang , Rolf Neugebauer , LKML , Linux Kernel Network Developers , Justin Cormack , Ian Campbell , Eric Dumazet Message-Id: <884D43D4-024E-4485-94E6-1E8DFF972483@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> To: Eric Dumazet X-Mailer: Apple Mail (2.3124) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uAJ0cH8n022362 > On Nov 14, 2016, at 3:09 PM, Eric Dumazet wrote: > > 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: >> >>> synchronize_rcu_expidited is not enough if you have multiple network >>> devices in play. >>> >>> 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. >>> >>> 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? >>> >>> commit 93d05d4a320cb16712bb3d57a9658f395d8cecb9 >>> Author: Eric Dumazet >>> Date: Wed Nov 18 06:31:03 2015 -0800 >> >> Absolutely, I will take a loop asap. > > The worst offender should be fixed by the following patch. > > busy poll needs to poll the physical device, not a virtual one... > > diff --git a/include/net/gro_cells.h b/include/net/gro_cells.h > index d15214d673b2e8e08fd6437b572278fb1359f10d..2a1abbf8da74368cd01adc40cef6c0644e059ef2 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 = per_cpu_ptr(gcells->cells, i); > > __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); > } > > > > > This fixes the problem for me, so for whatever it’s worth: Tested-by: Jarno Rajahalme