Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1144206pxb; Wed, 1 Sep 2021 18:55:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCTZwzxPsJZdzDblf9OtjepyBxxdeIYRVmPaumZ7r+Xlvvqu4eLHgsiXPtDAKE/hjhus3I X-Received: by 2002:a05:6638:168a:: with SMTP id f10mr747730jat.121.1630547703629; Wed, 01 Sep 2021 18:55:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630547703; cv=none; d=google.com; s=arc-20160816; b=QXX+zNRUwixNai30zojU34K+RP9DAtc8JD5wMuk2Dg8mSzOic6qVoVQdHW5ntBWuXn w00qJWmj9NzhNYuMlv0BiKurInrZkmIpUcSOiPBTi9mLANQUaR2HmX+Z5yQYdKKFGuzc GP4Wt/YH1Lsze71fJ7AL6KhsywGHA83tDXtglzS+FifCG+MBtx5lPn8pf89oNfI6Jzfj xL8eYb/MzO28WhNgFIsE7JeOKFOpfcGGCy/b+fus45AdTe/VFBCK1maeZdi1IQUIc9Db IaJdsNSq2IKspRjsnvAMUttJ33reNea1z64Ik24Fps6PRvoyGVKCD1NEAF3M0It1quUk lFHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=ZXk3XmiPWChzZb1CGYryr1/rtpU7HpRKkLF1/gdvwVY=; b=SNDrG30XseKdWCdEsXX0uAmhYhIkGP9WCeT3uk4/2BtbgnNnZuseJIQpAQCbuqhhIl rcBbh0AKV9PAy0mwI1PaP+JPvRobkbe9SW26lm0qaXzy6h+cAiBdtzANzBsRfcLXPPWl HE36gQ6Z+hyh1f2UkS6r53S0ueJaCIqmi6/WA6Vt7+UloZM3AZrRvD4SInCLVs/v9s2H 6imhu2+4AQhD1uaCEtf25YyGMqIMiqgcUwBMjWZOUB/BYb2h9iV+cyR6qgueFEbjJa+g xeNpUIPBTBBBLrU9PkeRolDPDrYvIEk4oBuLUAxniMIZwY7llRhthjeB9QSou+jfAu+P HwTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id v66si406648iof.105.2021.09.01.18.54.51; Wed, 01 Sep 2021 18:55:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230015AbhIBBhF (ORCPT + 99 others); Wed, 1 Sep 2021 21:37:05 -0400 Received: from mga06.intel.com ([134.134.136.31]:44648 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229454AbhIBBhA (ORCPT ); Wed, 1 Sep 2021 21:37:00 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10094"; a="279935094" X-IronPort-AV: E=Sophos;i="5.84,370,1620716400"; d="scan'208";a="279935094" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2021 18:36:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,370,1620716400"; d="scan'208";a="532561828" Received: from shbuild999.sh.intel.com (HELO localhost) ([10.239.146.151]) by FMSMGA003.fm.intel.com with ESMTP; 01 Sep 2021 18:35:58 -0700 Date: Thu, 2 Sep 2021 09:35:58 +0800 From: Feng Tang To: Andi Kleen Cc: Michal Koutn?? , Johannes Weiner , Linus Torvalds , andi.kleen@intel.com, kernel test robot , Roman Gushchin , Michal Hocko , Shakeel Butt , Balbir Singh , Tejun Heo , Andrew Morton , LKML , lkp@lists.01.org, kernel test robot , "Huang, Ying" , Zhengjun Xing Subject: Re: [mm] 2d146aa3aa: vm-scalability.throughput -36.4% regression Message-ID: <20210902013558.GA97410@shbuild999.sh.intel.com> References: <20210816032855.GB72770@shbuild999.sh.intel.com> <20210817024500.GC72770@shbuild999.sh.intel.com> <20210817164737.GA23342@blackbody.suse.cz> <20210818023004.GA17956@shbuild999.sh.intel.com> <20210831063036.GA46357@shbuild999.sh.intel.com> <20210831092304.GA17119@blackbody.suse.cz> <20210901045032.GA21937@shbuild999.sh.intel.com> <877dg0wcrr.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877dg0wcrr.fsf@linux.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 01, 2021 at 08:12:24AM -0700, Andi Kleen wrote: > Feng Tang writes: > > > > Yes, the tests I did is no matter where the 128B padding is added, the > > performance can be restored and even improved. > > I wonder if we can find some cold, rarely accessed, data to put into the > padding to not waste it. Perhaps some name strings? Or the destroy > support, which doesn't sound like its commonly used. Yes, I tried to move 'destroy_work', 'destroy_rwork' and 'parent' over before the 'refcnt' together with some padding, it restored the performance to about 10~15% regression. (debug patch pasted below) But I'm not sure if we should use it, before we can fully explain the regression. Thanks, Feng commit a308d90b0d1973eb75551540a7aa849cabc8b8af Author: Feng Tang Date: Sat Aug 14 16:18:43 2021 +0800 move the member around Signed-off-by: Feng Tang diff --git a/include/linux/cgroup-defs.h b/include/linux/cgroup-defs.h index f9fb7f0..255f668 100644 --- a/include/linux/cgroup-defs.h +++ b/include/linux/cgroup-defs.h @@ -139,10 +139,21 @@ struct cgroup_subsys_state { /* PI: the cgroup that this css is attached to */ struct cgroup *cgroup; + struct cgroup_subsys_state *parent; + /* PI: the cgroup subsystem that this css is attached to */ struct cgroup_subsys *ss; - unsigned long pad[16]; + /* percpu_ref killing and RCU release */ + struct work_struct destroy_work; + struct rcu_work destroy_rwork; + + unsigned long pad[2]; /* 128 bytes */ /* reference count - access via css_[try]get() and css_put() */ struct percpu_ref refcnt; @@ -176,6 +187,7 @@ struct cgroup_subsys_state { */ atomic_t online_cnt; + #if 0 /* percpu_ref killing and RCU release */ struct work_struct destroy_work; struct rcu_work destroy_rwork; @@ -185,6 +197,7 @@ struct cgroup_subsys_state { * fields of the containing structure. */ struct cgroup_subsys_state *parent; + #endif }; /* > -Andi