From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FC0DCCA47C for ; Fri, 24 Jun 2022 01:57:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BF2A38E01B5; Thu, 23 Jun 2022 21:57:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BD4168E01A1; Thu, 23 Jun 2022 21:57:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A93568E01B5; Thu, 23 Jun 2022 21:57:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 98ECA8E01A1 for ; Thu, 23 Jun 2022 21:57:46 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 6FA2035742 for ; Fri, 24 Jun 2022 01:57:46 +0000 (UTC) X-FDA: 79611468132.11.ED40BA4 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by imf11.hostedemail.com (Postfix) with ESMTP id CAD7F40030 for ; Fri, 24 Jun 2022 01:57:45 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id B21D0CE25DC; Fri, 24 Jun 2022 01:57:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B392C3411D; Fri, 24 Jun 2022 01:57:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656035860; bh=A5G1y5zfAakBvev3o+XJTirP3qP3skGJx2wBFS2dMIw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NjKjfEStvKxSWdi9XBcvE5z2PoJQ+rRQOSMkMkbJY0GP0VoRTsPwg9uwXpmXN1cvd xU6FarBJ5y1fQR2qVqKLuGdOHOdhGQRQuJX9ctEO+u1izzWm6xBvbhiefSVZrCnoPX PilF/HnqBRc6tuVGYzt2xvXD2+Lxr6ZtOiEtedEtv9GmJEhWFkaX5rqDDGyxwjV4N8 wId5i2oWRkpJ5yRyitMGL4QJ6wWk3Am92+3kp8HX+9MjWEFXcvfYQACVljd0P8mwmj uwbSRHSLYlTYBy57r5Yaam5U1qLUZvo5XbLYt7E+Q9m2mcLXLDsC4m8Jf5AqATNa1O SNi52mAnS305Q== Date: Thu, 23 Jun 2022 18:57:30 -0700 From: Jakub Kicinski To: Xin Long Cc: Marcelo Ricardo Leitner , kernel test robot , Eric Dumazet , Shakeel Butt , Soheil Hassas Yeganeh , LKML , Linux Memory Management List , network dev , linux-s390@vger.kernel.org, mptcp@lists.linux.dev, "linux-sctp @ vger . kernel . org" , lkp@lists.01.org, kbuild test robot , Huang Ying , feng.tang@intel.com, zhengjun.xing@linux.intel.com, fengwei.yin@intel.com, Ying Xu Subject: Re: [net] 4890b686f4: netperf.Throughput_Mbps -69.4% regression Message-ID: <20220623185730.25b88096@kernel.org> In-Reply-To: References: <20220619150456.GB34471@xsang-OptiPlex-9020> <20220622172857.37db0d29@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NjKjfESt; spf=pass (imf11.hostedemail.com: domain of kuba@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=kuba@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656035866; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=l9twQ1x614mIBqPjiXwhf6kRL8KFt9ovEOrE4OItonM=; b=PjAXbJ5TvKNfSLmrbBzadm+dYCn+463TPtdofeIRNUca61EYfT3v6pE1ZfyEtODbfnX1KM yghPUI/oCbprHYPUIvK0OlCdLqtUYkhNz/zkkapFi1TDGIpVubXexQ6i8aHbWgqb8aQHHy fngzF6PtsJfK/ezdrZW8xwnuM1Y9xOQ= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656035866; a=rsa-sha256; cv=none; b=gUmYlxovLO6ndDDpJBUa5unmerPmluaqg2edEA78aZVWb+Fa6js2WJP2GHMAsSVywyssnz xTMziiibc92HnsBQ5itT4kh0PU7WCXokj+DQM1cKS1BOWtwmLeC+sKAiIERnQfdhrqrzJJ k+/WhMasTe04VzMsI+KLdU3+TRk2Gfw= X-Stat-Signature: cb4zbur843psq8c9p4eh9cfsuh9jubga X-Rspamd-Queue-Id: CAD7F40030 X-Rspam-User: Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=NjKjfESt; spf=pass (imf11.hostedemail.com: domain of kuba@kernel.org designates 145.40.73.55 as permitted sender) smtp.mailfrom=kuba@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam02 X-HE-Tag: 1656035865-732763 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, 23 Jun 2022 18:50:07 -0400 Xin Long wrote: > From the perf data, we can see __sk_mem_reduce_allocated() is the one > using CPU the most more than before, and mem_cgroup APIs are also > called in this function. It means the mem cgroup must be enabled in > the test env, which may explain why I couldn't reproduce it. > > The Commit 4890b686f4 ("net: keep sk->sk_forward_alloc as small as > possible") uses sk_mem_reclaim(checking reclaimable >= PAGE_SIZE) to > reclaim the memory, which is *more frequent* to call > __sk_mem_reduce_allocated() than before (checking reclaimable >= > SK_RECLAIM_THRESHOLD). It might be cheap when > mem_cgroup_sockets_enabled is false, but I'm not sure if it's still > cheap when mem_cgroup_sockets_enabled is true. > > I think SCTP netperf could trigger this, as the CPU is the bottleneck > for SCTP netperf testing, which is more sensitive to the extra > function calls than TCP. > > Can we re-run this testing without mem cgroup enabled? FWIW I defer to Eric, thanks a lot for double checking the report and digging in!