Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5355316ybi; Wed, 12 Jun 2019 00:50:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcSjop8ghnZRmocHOEP+P1+cJ8dRXCjgkwjxx6SodizHCBZ9QiOJJ2N1p7yqnP572564v/ X-Received: by 2002:a17:902:b603:: with SMTP id b3mr22033628pls.72.1560325818076; Wed, 12 Jun 2019 00:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560325818; cv=none; d=google.com; s=arc-20160816; b=te8IM2z29is/CUlPIGNvpv39FKs/xty7YUAVDdo8NbMED2W905sdNkqnDbKv9Hem68 hYDz4YOfV6xGck//OLEtCh/0Abhrrj6iB5nCUHb9+UzEp+e3Fli+a365Pwql+5PFu6eJ Uns24xlUOx/QtBs4J3wvmCbOSVcC/g1WN5rUiNjUBlBrlIJv9qOd3igN/kGbslbU2nGf ws3bufgX2OfrpGdCHiMWrw4Wjfy85blIb2BvI3ei8r3TEU8/Odwex7FjAOlzvtmOTFVO NZU/JWSWgLxTEzOMYUGkEqKE+cYj5ukObRQxCi0ZlZ63efJjwHD0J90A81X7nYyn/KuO V9Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=WzCGtKuyFnQuH1pCP1IrDM9+eaHe2cekUm0Jd0C7xRw=; b=COBBg34QwMDrT2BodND4VYM2aTKAdFoLQmhEA5IIAQD6Fv/RdQLw0OKQKY4z0xrn8h +nrSUp+06f+YhRWjvh/B1JICgtZsw4AcRkXGFKImFew7+yte8X3f4ahkBMpH9Y66qz2X 1DfeXVATVO8+VSciy3FhsjMWevmpzo4RoJkHc5iKVU9I6Sp00m2J4G9NMXmeaHCgbW2e O8x/QMcGxdrFVOEENFHtB1n1/aTzce3kCDXwsSP0ck2qICrBwDWtQmwMrLzBbSsCHo+5 DMVYaRgLZkY/WTkV7G6s8HuLDmfEQxXh6ueg8UmSH1GW0szhpFjeDq0FRCuJ9FmaucOz BJfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 14si16018437pfw.143.2019.06.12.00.49.58; Wed, 12 Jun 2019 00:50:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407657AbfFLDwT (ORCPT + 99 others); Tue, 11 Jun 2019 23:52:19 -0400 Received: from mga17.intel.com ([192.55.52.151]:59546 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407047AbfFLDwT (ORCPT ); Tue, 11 Jun 2019 23:52:19 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jun 2019 20:52:19 -0700 X-ExtLoop1: 1 Received: from shbuild999.sh.intel.com (HELO localhost) ([10.239.147.113]) by orsmga005.jf.intel.com with ESMTP; 11 Jun 2019 20:52:15 -0700 Date: Wed, 12 Jun 2019 11:52:29 +0800 From: Feng Tang To: Eric Dumazet Cc: kernel test robot , Stephen Rothwell , Willem de Bruijn , Soheil Hassas Yeganeh , LKML , "lkp@01.org" , "David S. Miller" , ying.huang@intel.com Subject: Re: [LKP] [tcp] 8b27dae5a2: netperf.Throughput_Mbps -25.7% regression Message-ID: <20190612035133.GA18313@shbuild999.sh.intel.com> References: <20190403063436.GG20952@shao2-debian> <20190530103048.hfld4t4m37jsg4yo@shbuild888> <20190530152314.ise5ycz6sdwfygph@shbuild888> <20190604100735.s2g3tc35ofybimek@shbuild888> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190604100735.s2g3tc35ofybimek@shbuild888> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 04, 2019 at 06:07:35PM +0800, Feng Tang wrote: > On Thu, May 30, 2019 at 11:23:14PM +0800, Feng Tang wrote: > > Hi Eric, > > > > On Thu, May 30, 2019 at 05:21:40AM -0700, Eric Dumazet wrote: > > > On Thu, May 30, 2019 at 3:31 AM Feng Tang wrote: > > > > > > > > On Wed, Apr 03, 2019 at 02:34:36PM +0800, kernel test robot wrote: > > > > > Greeting, > > > > > > > > > > FYI, we noticed a -25.7% regression of netperf.Throughput_Mbps due to commit: > > > > > > > > > > > > > > > commit: 8b27dae5a2e89a61c46c6dbc76c040c0e6d0ed4c ("tcp: add one skb cache for rx") > > > > > https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master > > > > > > > > Hi Eric, > > > > > > > > Could you help to check this? thanks, > > > > > > > > > > Hmmm... patch is old and had some bugs that have been fixed. > > > > > > What numbers do you have with more recent kernels ? > > > > > > I just run the test with 5.2-rc2, and the regression is still there. > > Hi Eric, > > Any hint on this? > > >From the perf data, the spinlock contention has an obvious increase: > > 9.28 +7.6 16.91 perf-profile.calltrace.cycles-pp.native_queued_spin_lock_slowpath._raw_spin_lock.free_one_page.__free_pages_ok.___pskb_trim > 18.55 +8.6 27.14 perf-profile.calltrace.cycles-pp.native_queued_spin_lock_slowpath._raw_spin_lock_irqsave.get_page_from_freelist.__alloc_pages_nodemask.skb_page_frag_refill Hi Eric, Any thoughts? Actually I did some further check. The increased lock contention comes from the mm zone lock for page alloc/free. I did an experiment by changing the SKB_FRAG_PAGE_ORDER from 32K to 64K, the lock contention is dramatically reduced, and the throughput got some recovery (10% ~ 15% gain) depending on HW platform, but can't fully recover the -25.7% loss. Hope this info helps. Thanks, Feng > > And for commit 8b27dae5a2 ("tcp: add one skb cache for rx"), IIUC, it > is not a real cache like the "tx skb cache" patch, and kind of a > delayed freeing. > > Thanks, > Feng > >