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 EF53BC3DA59 for ; Mon, 22 Jul 2024 15:37:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7F9D26B0085; Mon, 22 Jul 2024 11:37:40 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7AA2C6B0088; Mon, 22 Jul 2024 11:37:40 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 671D46B0089; Mon, 22 Jul 2024 11:37:40 -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 42C506B0085 for ; Mon, 22 Jul 2024 11:37:40 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id E52DC141872 for ; Mon, 22 Jul 2024 15:37:39 +0000 (UTC) X-FDA: 82367793438.26.8D93C3E Received: from out-184.mta1.migadu.com (out-184.mta1.migadu.com [95.215.58.184]) by imf29.hostedemail.com (Postfix) with ESMTP id 6857F120011 for ; Mon, 22 Jul 2024 15:37:37 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=m6lucmiF; spf=pass (imf29.hostedemail.com: domain of roman.gushchin@linux.dev designates 95.215.58.184 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=1721662597; 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=l5rKqb5oYX28jAL5sq1lJYXnRV7xYOZ3odZ9hgHn7Ko=; b=qgNmhzSX5HBmO6H1M6VZ9PeDnLBbV1tWpUiStlnJOY2cD5OnYmvSqvrTRf4U0a5r+ZzwFh Ec2xTAJ+lp7Vuxu1Ij/VvOLaR289Vy52mwfhDEeZx+2wxL7xcKWe3Slch9tVzwt8fxRbhx KZGbXrXT2FisZ5/0/0Jq6IX5c9HvMLo= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=m6lucmiF; spf=pass (imf29.hostedemail.com: domain of roman.gushchin@linux.dev designates 95.215.58.184 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1721662597; a=rsa-sha256; cv=none; b=fhcvWuqfiWr4/lIWnU6TL2pWrWLjQmSBRVhqDqFp+2qvfJPbWI1RD7WFqQm/lV7CAEP6Cm TKr0wo5R8NJkrF+eIz3mToJWEqwFNQxxqdM/WFPasWlu1ZNhLJCfU5eRBxn6TLkm7YD1qm H7HF66WzFeKt4bPdgrFFyqdQf/5mzNo= X-Envelope-To: shakeel.butt@linux.dev DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1721662655; 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=l5rKqb5oYX28jAL5sq1lJYXnRV7xYOZ3odZ9hgHn7Ko=; b=m6lucmiFNhPS9bPEABMuT1JdzTiR1gPEV6zFaDlc3vDA5ZgKApbXqNLVCfVPNDFJX+t6aw gPCjpR8ipWX0qTIi/iXyCsO4sWfepIGUhH/X2YOSrRF2C5nct/SdAWcIB3vzSwvXcxxvZf GBJvZrsM2ESih664q5rH22PjdQmhqR8= X-Envelope-To: oliver.sang@intel.com X-Envelope-To: oe-lkp@lists.linux.dev X-Envelope-To: lkp@intel.com X-Envelope-To: linux-mm@kvack.org X-Envelope-To: akpm@linux-foundation.org X-Envelope-To: hannes@cmpxchg.org X-Envelope-To: mhocko@kernel.org X-Envelope-To: muchun.song@linux.dev X-Envelope-To: cgroups@vger.kernel.org X-Envelope-To: ying.huang@intel.com X-Envelope-To: feng.tang@intel.com X-Envelope-To: fengwei.yin@intel.com Date: Mon, 22 Jul 2024 15:37:27 +0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Shakeel Butt Cc: Oliver Sang , oe-lkp@lists.linux.dev, lkp@intel.com, Linux Memory Management List , Andrew Morton , Johannes Weiner , Michal Hocko , Muchun Song , cgroups@vger.kernel.org, ying.huang@intel.com, feng.tang@intel.com, fengwei.yin@intel.com Subject: Re: [linux-next:master] [mm] 98c9daf5ae: aim7.jobs-per-min -29.4% regression Message-ID: References: <202407121335.31a10cb6-oliver.sang@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-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 6857F120011 X-Stat-Signature: kca56aphjeukg18rftq8zk7saw1txc5q X-Rspam-User: X-HE-Tag: 1721662657-939589 X-HE-Meta: U2FsdGVkX181axOkeG5MyzqrT75zgZtU4g1XwGzYETS0nm+zAObX6aQ/x24v3fg8vh0kaHp/3t7dXxIV4zHL/nS61o8lmlzAumpm36Qe47gieJjWLArpLFdpUlgI2FyVV5Rdpi7a12SOfOUL+OItpcKo3w67Ri+tTYvLivlKMZRVdNvxoxSeeJvxGDUIRRgHMmBK9ADmky7U+W8qIlfJj5Js/lK78hDa0NvI0g+7y6PYDx33OGw59BJfDTGcbk7dSWgJGdJw0fWaHJ9bsiiM1kfnNm93pSH1ukXflLktfCw60ZR68aC4FnNSP25/hLd8WXQlAm+jKu7gohN/HeOoV6opTYiKgakCA8e2O56H1EYAkED520tTPAqyDT2Z4NBE/sq2RI+AxVaE7KRJKdoyKhlv5/3wNfQeXq9tp26ojvp5Vq5lK4s8z140Thx0p+Bz3Mw2CrhYzD637DN9Tc2+8EPiQ4sv2z7Zc8Egbs78M58t2TSfqfYOefIzqTZysRxUaEer/UK6azzBF+Xgn6aOe8L2l4LqlQPBI5IXsJAmjsKnm3q4v45GDBm55CHj823exjlhA74TvAhp/p9aH3VdPBaqpC1zcM+gANxmvrlkloRPHEl2K91vTWQvjaF7mkinimGZ30jIaVXfGgNvzEUXlvsrSAIobwmWo51YDZukLcyiLaevAiv1YDJ5oUZu5rxfPNRsKVQNmewwjsLFlkM5hvB3+E10zZRyjKLxoqFg837sonHSXtY6aljLAHp8PXSs02lh94AE/jsZvlrbtUBoTcbIzLb/+2BiF8thdxIpFRVBoK2hgSmqLMfCsaAccANrKcXZ+Vhlq/5EpSnw4+FSYAIu+8xa7zdsZEy2doTxDAn3uKCE3NoKTKWoQ7SDmbh2ADz+0QIKeYUrWsz+MoRxTjsLBry3DTAhxlB9TxBx/w7nZ9YNdlJ2KLeff5pWDQhXmzGXqh7MBNPCbhu3LGv dcA2t48M 4Ba4NfO/jFr5QwNTEzvTGo8dSQSMltPHdkxtF65Jr96OkBI6n5dp1fmC/MSOS5z1ABrOH+GYTA564Tk+4Al0wHIDCtlo9e25h5JH4Lar2MRH9zL0GHaH38ynwOVe7a2BwqDn/2OPEYhA3gjtATsdSIv7vTreL4RvzsOFySFOS+GPuwPG15zkQspJyqD62GJCZtjC56uWm7hr7eNdm2g5ay26kHA== 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: List-Subscribe: List-Unsubscribe: On Fri, Jul 19, 2024 at 03:38:26PM -0700, Shakeel Butt wrote: > On Fri, Jul 19, 2024 at 05:14:16PM GMT, Roman Gushchin wrote: > > On Tue, Jul 16, 2024 at 03:53:25PM +0800, Oliver Sang wrote: > > > hi, Roman, > > > > > > On Mon, Jul 15, 2024 at 10:18:39PM +0000, Roman Gushchin wrote: > > > > On Mon, Jul 15, 2024 at 10:14:31PM +0800, Oliver Sang wrote: > > > > > hi, Roman Gushchin, > > > > > > > > > > On Fri, Jul 12, 2024 at 07:03:31PM +0000, Roman Gushchin wrote: > > > > > > On Fri, Jul 12, 2024 at 02:04:48PM +0800, kernel test robot wrote: > > > > > > > > > > > > > > > > > > > > > Hello, > > > > > > > > > > > > > > kernel test robot noticed a -29.4% regression of aim7.jobs-per-min on: > > > > > > > > > > > > > > > > > > > > > commit: 98c9daf5ae6be008f78c07b744bcff7bcc6e98da ("mm: memcg: guard memcg1-specific members of struct mem_cgroup_per_node") > > > > > > > https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master > > > > > > > > > > > > Hello, > > > > > > > > > > > > thank you for the report! > > > > > > > > > > > > I'd expect that the regression should be fixed by the commit > > > > > > "mm: memcg: add cache line padding to mem_cgroup_per_node". > > > > > > > > > > > > Can you, please, confirm that it's not the case? > > > > > > > > > > > > Thank you! > > > > > > > > > > in our this aim7 test, we found the performance partially recovered by > > > > > "mm: memcg: add cache line padding to mem_cgroup_per_node" but not fully > > > > > > > > Thank you for providing the detailed information! > > > > > > > > Can you, please, check if the following patch resolves the regression entirely? > > > > > > no. in our tests, the following patch has little impact. > > > I directly apply it upon 6df13230b6 (if this is not the proper applyment, please > > > let me know, thanks) > > > > Hm, interesting. And thank you for the confirmation, you did everything correct. > > Because the only thing the original patch did was a removal of few fields from > > the mem_cgroup_per_node struct, there are not many options left here. > > Would you mind to try the following patch? > > > > Thank you and really appreciate your help! > > > > > > diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h > > index 7e2eb091049a..0e5bf25d324f 100644 > > --- a/include/linux/memcontrol.h > > +++ b/include/linux/memcontrol.h > > @@ -109,6 +109,7 @@ struct mem_cgroup_per_node { > > > > /* Fields which get updated often at the end. */ > > struct lruvec lruvec; > > + CACHELINE_PADDING(_pad2_); > > unsigned long lru_zone_size[MAX_NR_ZONES][NR_LRU_LISTS]; > > struct mem_cgroup_reclaim_iter iter; > > }; > > > > > > I suspect we need padding in the struct mem_cgroup instead of in struct > mem_cgroup_per_node. I am planning to run some experiments and will > report back once I have some convincing numbers. You mean the regression was attributed to the wrong commit? Because the blamed commit only removed few fields from the middle of mem_cgroup_per_node. Thanks