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 00EA4C43334 for ; Tue, 28 Jun 2022 01:47:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 913C08E0002; Mon, 27 Jun 2022 21:47:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8C4148E0001; Mon, 27 Jun 2022 21:47:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 78C238E0002; Mon, 27 Jun 2022 21:47:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 693638E0001 for ; Mon, 27 Jun 2022 21:47:04 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 394921209F5 for ; Tue, 28 Jun 2022 01:47:04 +0000 (UTC) X-FDA: 79625956368.18.537E2B9 Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by imf03.hostedemail.com (Postfix) with ESMTP id ABD372002A for ; Tue, 28 Jun 2022 01:47:03 +0000 (UTC) Date: Mon, 27 Jun 2022 18:46:44 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1656380820; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ORdLe5wVx7GzxxMtzEujYJBVbDhPT8vtTYMDRzc+hUM=; b=ctCXHWlV79XK06hz0/egR14h1WrQtW6OqdpoYuhXrwnV4k6ahAaXCUNyw4vskHn4vKSf+m 3WlYbBfaHxPvdtR+zayNdLZiOJnjqFjG1N23ON6FHn1abZfSgM5OwfnZqbiWeASScl0i7c LMyQj8wvsIK0gksoQYXXMp5JpN1W4y0= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Shakeel Butt Cc: Eric Dumazet , Feng Tang , Linux MM , Andrew Morton , Michal Hocko , Johannes Weiner , Muchun Song , Jakub Kicinski , Xin Long , Marcelo Ricardo Leitner , kernel test robot , Soheil Hassas Yeganeh , LKML , network dev , linux-s390@vger.kernel.org, MPTCP Upstream , "linux-sctp @ vger . kernel . org" , lkp@lists.01.org, kbuild test robot , Huang Ying , Xing Zhengjun , Yin Fengwei , Ying Xu Subject: Re: [net] 4890b686f4: netperf.Throughput_Mbps -69.4% regression Message-ID: References: <20220624070656.GE79500@shbuild999.sh.intel.com> <20220624144358.lqt2ffjdry6p5u4d@google.com> <20220625023642.GA40868@shbuild999.sh.intel.com> <20220627023812.GA29314@shbuild999.sh.intel.com> <20220627123415.GA32052@shbuild999.sh.intel.com> <20220627144822.GA20878@shbuild999.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656380823; a=rsa-sha256; cv=none; b=1P2MwxqcqhptneRiefQSaWaIRzFwj9qr4NZp8/Oqr+SIWH8x6Jk8e4T/YwxDprqUMfu9g5 0rb4uvQNBoIDlyqyo3Qv+/cvePe5M/efIL3pX+NMWimHJH0Z7c2cuY29lhwgp5/qXZoW6j e510nRTPz3JUxerwCrXnZxu6RjjLcCs= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=ctCXHWlV; spf=pass (imf03.hostedemail.com: domain of roman.gushchin@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656380823; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ORdLe5wVx7GzxxMtzEujYJBVbDhPT8vtTYMDRzc+hUM=; b=qgBeBGBDFMm9pj7igvodsUCXGTXDN0X8wrCjOIzpuvKExf/1y5o6FAWbFBhzs2nVwU8nYp mYkymJ8j+WKEr8ppFsRNzlTqTySyXe2EIE4qhhqehzib0ISC/O/aPOp59i+rvWTWfQDTkh rpSGUV1YGVgOGgVcbMrzZDG/tEUPnP4= X-Rspam-User: Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=ctCXHWlV; spf=pass (imf03.hostedemail.com: domain of roman.gushchin@linux.dev designates 91.121.223.63 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Rspamd-Server: rspam02 X-Stat-Signature: nfmumfstq7ubd75f1zwz71698kprdder X-Rspamd-Queue-Id: ABD372002A X-HE-Tag: 1656380823-910126 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 Mon, Jun 27, 2022 at 09:48:01AM -0700, Shakeel Butt wrote: > On Mon, Jun 27, 2022 at 9:26 AM Eric Dumazet wrote: > > > [...] > > > > > > > I simply did the following and got much better results. > > > > But I am not sure if updates to ->usage are really needed that often... > > I suspect we need to improve the per-cpu memcg stock usage here. Were > the updates mostly from uncharge path or charge path or that's > irrelevant? > > I think doing full drain (i.e. drain_stock()) within __refill_stock() > when the local cache is larger than MEMCG_CHARGE_BATCH is not best. > Rather we should always keep at least MEMCG_CHARGE_BATCH for such > scenarios. +1, really good point.