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 B61B0CCA480 for ; Sat, 25 Jun 2022 02:36:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E6C1A8E0284; Fri, 24 Jun 2022 22:36:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E1BE56B00F2; Fri, 24 Jun 2022 22:36:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CBC778E0284; Fri, 24 Jun 2022 22:36:52 -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 B900E6B00F1 for ; Fri, 24 Jun 2022 22:36:52 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id 642818036B for ; Sat, 25 Jun 2022 02:36:52 +0000 (UTC) X-FDA: 79615195464.03.994524D Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by imf25.hostedemail.com (Postfix) with ESMTP id EBB29A002A for ; Sat, 25 Jun 2022 02:36:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1656124611; x=1687660611; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=7UU7ei0p3fZSOJ/8dN+UbHzSxDz0FQ0Q5dZSwXjI5YY=; b=kp53Bx9XAw+gRK1nw+zcXXaLNkqh7BVQl3E+DeuETtksG2GOJhy3O7Rc MFgAkankbiCq/rtG42MUynDBQT0vRhz+p49cWA7ICtBWJefZBNE5/PUCQ jX3MV+i1WI3kptDFwtJo3zNqT2BSt9C7iJjYgNYSYFnx0/wT2M/15Bi3w U7/ci/dn6xjU/D9ZQem7zBQ44SaqOnAVsYaAO/i7oaAai2fowozBCcdXn FKn4zc6gdnvwS0Zp+CJXhaO/wOS6xUn+X6athymEID++SKFfwlAqTV4t+ ordNlF3ziobmNYttNF1gj9OclBuFQFny89mwnQPaEqw8TsF2DXor3YGdt Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10388"; a="367454458" X-IronPort-AV: E=Sophos;i="5.92,221,1650956400"; d="scan'208";a="367454458" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2022 19:36:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,221,1650956400"; d="scan'208";a="678785905" Received: from shbuild999.sh.intel.com (HELO localhost) ([10.239.146.138]) by FMSMGA003.fm.intel.com with ESMTP; 24 Jun 2022 19:36:42 -0700 Date: Sat, 25 Jun 2022 10:36:42 +0800 From: Feng Tang To: Shakeel Butt , Eric Dumazet Cc: Eric Dumazet , Linux MM , Andrew Morton , Roman Gushchin , 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: <20220625023642.GA40868@shbuild999.sh.intel.com> References: <20220619150456.GB34471@xsang-OptiPlex-9020> <20220622172857.37db0d29@kernel.org> <20220623185730.25b88096@kernel.org> <20220624070656.GE79500@shbuild999.sh.intel.com> <20220624144358.lqt2ffjdry6p5u4d@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220624144358.lqt2ffjdry6p5u4d@google.com> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656124612; a=rsa-sha256; cv=none; b=k5sTSD4ueY8nczilYrwpZ0sS8MOe/Lu6uIDpJorUG6BVn5D2agoCUfKEPk9cbGB2cKWnNk eGK9XNW2tGa7xnXhA3KOjS3eYg9qOv9i1zml23k/1LuCLIgq3n8SJ+w3ZNdzI5tsvjSESE vVnOug2pn7K1Y2hyUZpy+nOb46/dqrI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656124612; 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=9gFsbHSilx5ysasJjglS703ujyAHT+7gQf4pBRbqUUE=; b=N69ZcCepcj3KlKLaSVGApDmdfr6fHkrR6dZ5eOmcRdmrxMlL3NVB735BOkfbxAC70Ixvmo 5jBd2VpktO71QXd43M1TGgYMl1Mo8Mu6UWBRWfT+Rr3RHRQBfzOIFHdXe97gTn5aeFRYs6 nusAUggvh0j+E3MCYf1Fg1rlerLrXDE= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=kp53Bx9X; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf25.hostedemail.com: domain of feng.tang@intel.com has no SPF policy when checking 192.55.52.43) smtp.mailfrom=feng.tang@intel.com X-Stat-Signature: dcdbkdtbjcsm4mbhgkjr7orf31oy8mbh X-Rspamd-Queue-Id: EBB29A002A Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=kp53Bx9X; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf25.hostedemail.com: domain of feng.tang@intel.com has no SPF policy when checking 192.55.52.43) smtp.mailfrom=feng.tang@intel.com X-Rspam-User: X-Rspamd-Server: rspam04 X-HE-Tag: 1656124610-606846 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 Fri, Jun 24, 2022 at 02:43:58PM +0000, Shakeel Butt wrote: > On Fri, Jun 24, 2022 at 03:06:56PM +0800, Feng Tang wrote: > > On Thu, Jun 23, 2022 at 11:34:15PM -0700, Shakeel Butt wrote: > [...] > > > > > > Feng, can you please explain the memcg setup on these test machines > > > and if the tests are run in root or non-root memcg? > > > > I don't know the exact setup, Philip/Oliver from 0Day can correct me. > > > > I logged into a test box which runs netperf test, and it seems to be > > cgoup v1 and non-root memcg. The netperf tasks all sit in dir: > > '/sys/fs/cgroup/memory/system.slice/lkp-bootstrap.service' > > > > Thanks Feng. Can you check the value of memory.kmem.tcp.max_usage_in_bytes > in /sys/fs/cgroup/memory/system.slice/lkp-bootstrap.service after making > sure that the netperf test has already run? memory.kmem.tcp.max_usage_in_bytes:0 And here is more memcg stats (let me know if you want to check more) /sys/fs/cgroup/memory/system.slice/lkp-bootstrap.service# grep . memory.* memory.failcnt:0 memory.kmem.failcnt:0 memory.kmem.limit_in_bytes:9223372036854771712 memory.kmem.max_usage_in_bytes:47861760 memory.kmem.tcp.failcnt:0 memory.kmem.tcp.limit_in_bytes:9223372036854771712 memory.kmem.tcp.max_usage_in_bytes:0 memory.kmem.tcp.usage_in_bytes:0 memory.kmem.usage_in_bytes:40730624 memory.limit_in_bytes:9223372036854771712 memory.max_usage_in_bytes:642424832 memory.memsw.failcnt:0 memory.memsw.limit_in_bytes:9223372036854771712 memory.memsw.max_usage_in_bytes:642424832 memory.memsw.usage_in_bytes:639549440 memory.move_charge_at_immigrate:0 memory.numa_stat:total=144073 N0=124819 N1=19254 memory.numa_stat:file=0 N0=0 N1=0 memory.numa_stat:anon=77721 N0=58502 N1=19219 memory.numa_stat:unevictable=66352 N0=66317 N1=35 memory.numa_stat:hierarchical_total=144073 N0=124819 N1=19254 memory.numa_stat:hierarchical_file=0 N0=0 N1=0 memory.numa_stat:hierarchical_anon=77721 N0=58502 N1=19219 memory.numa_stat:hierarchical_unevictable=66352 N0=66317 N1=35 memory.oom_control:oom_kill_disable 0 memory.oom_control:under_oom 0 memory.oom_control:oom_kill 0 grep: memory.pressure_level: Invalid argument memory.soft_limit_in_bytes:9223372036854771712 memory.stat:cache 282562560 memory.stat:rss 307884032 memory.stat:rss_huge 239075328 memory.stat:shmem 10784768 memory.stat:mapped_file 3444736 memory.stat:dirty 0 memory.stat:writeback 0 memory.stat:swap 0 memory.stat:pgpgin 1018918 memory.stat:pgpgout 932902 memory.stat:pgfault 2130513 memory.stat:pgmajfault 0 memory.stat:inactive_anon 310272000 memory.stat:active_anon 8073216 memory.stat:inactive_file 0 memory.stat:active_file 0 memory.stat:unevictable 271777792 memory.stat:hierarchical_memory_limit 9223372036854771712 memory.stat:hierarchical_memsw_limit 9223372036854771712 memory.stat:total_cache 282562560 memory.stat:total_rss 307884032 memory.stat:total_rss_huge 239075328 memory.stat:total_shmem 10784768 memory.stat:total_mapped_file 3444736 memory.stat:total_dirty 0 memory.stat:total_writeback 0 memory.stat:total_swap 0 memory.stat:total_pgpgin 1018918 memory.stat:total_pgpgout 932902 memory.stat:total_pgfault 2130513 memory.stat:total_pgmajfault 0 memory.stat:total_inactive_anon 310272000 memory.stat:total_active_anon 8073216 memory.stat:total_inactive_file 0 memory.stat:total_active_file 0 memory.stat:total_unevictable 271777792 memory.swappiness:60 memory.usage_in_bytes:639549440 memory.use_hierarchy:1 > If this is non-zero then network memory accounting is enabled and the > slowdown is expected. >From the perf-profile data in original report, both __sk_mem_raise_allocated() and __sk_mem_reduce_allocated() are called much more often, which call memcg charge/uncharge functions. IIUC, the call chain is: __sk_mem_raise_allocated sk_memory_allocated_add mem_cgroup_charge_skmem charge memcg->tcpmem (for cgroup v2) try_charge memcg (for v1) Also from Eric's one earlier commit log: " net: implement per-cpu reserves for memory_allocated ... This means we are going to call sk_memory_allocated_add() and sk_memory_allocated_sub() more often. ... " So this slowdown is related to the more calling of charge/uncharge? Thanks, Feng > > And the rootfs is a debian based rootfs > > > > Thanks, > > Feng > > > > > > > thanks, > > > Shakeel