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 X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE10FC2B9F7 for ; Fri, 28 May 2021 15:18:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 253B961248 for ; Fri, 28 May 2021 15:18:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 253B961248 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AF7C86B0036; Fri, 28 May 2021 11:18:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AA7F06B006E; Fri, 28 May 2021 11:18:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 996BF6B0070; Fri, 28 May 2021 11:18:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0088.hostedemail.com [216.40.44.88]) by kanga.kvack.org (Postfix) with ESMTP id 6C2706B0036 for ; Fri, 28 May 2021 11:18:38 -0400 (EDT) Received: from smtpin35.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id EFB8A1801D03C for ; Fri, 28 May 2021 15:18:37 +0000 (UTC) X-FDA: 78190996674.35.A19D467 Received: from outbound-smtp17.blacknight.com (outbound-smtp17.blacknight.com [46.22.139.234]) by imf17.hostedemail.com (Postfix) with ESMTP id 93CDE41449D5 for ; Fri, 28 May 2021 15:18:31 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp17.blacknight.com (Postfix) with ESMTPS id E0A8B1C390F for ; Fri, 28 May 2021 16:18:35 +0100 (IST) Received: (qmail 17224 invoked from network); 28 May 2021 15:18:35 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.23.168]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 28 May 2021 15:18:35 -0000 Date: Fri, 28 May 2021 16:18:34 +0100 From: Mel Gorman To: Dave Hansen Cc: Andrew Morton , Hillf Danton , Dave Hansen , Vlastimil Babka , Michal Hocko , LKML , Linux-MM , "Tang, Feng" Subject: Re: [PATCH 0/6 v2] Calculate pcp->high based on zone sizes and active CPUs Message-ID: <20210528151834.GR30378@techsingularity.net> References: <20210525080119.5455-1-mgorman@techsingularity.net> <7177f59b-dc05-daff-7dc6-5815b539a790@intel.com> <20210528085545.GJ30378@techsingularity.net> <893ce8ed-df14-612b-693f-48c9dac0eb19@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <893ce8ed-df14-612b-693f-48c9dac0eb19@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 93CDE41449D5 Authentication-Results: imf17.hostedemail.com; dkim=none; spf=pass (imf17.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.139.234 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none X-Rspamd-Server: rspam03 X-Stat-Signature: 836aqfj6fzsh79x5pf1wwotb9hu3m5a7 X-HE-Tag: 1622215111-755323 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, May 28, 2021 at 07:39:29AM -0700, Dave Hansen wrote: > On 5/28/21 1:55 AM, Mel Gorman wrote: > > - * onlined. > > - */ > > - nr_local_cpus = max(1U, cpumask_weight(cpumask_of_node(zone_to_nid(zone)))) + cpu_online; > > - high = total_pages / nr_local_cpus; > > + * onlined. For memory nodes that have no CPUs, split pcp->high across > > + * all online CPUs to mitigate the risk that reclaim is triggered > > + * prematurely due to pages stored on pcp lists. > > + */ > > + nr_split_cpus = cpumask_weight(cpumask_of_node(zone_to_nid(zone))) + cpu_online; > > + if (!nr_split_cpus) > > + nr_split_cpus = num_online_cpus(); > > + high = total_pages / nr_split_cpus; > > Updated version looks fine to me, thanks! > > BTW, to do some of this testing, Feng was doing a plain old kernel > build. On the one system where this got run, he noted a ~2% regression > in build times. Nothing major, but you might want to be on the lookout > in case 0day or the other test harnesses find something similar once > this series gets to them. > What type of system was it? I noticed minor differences for some thread counts on kernel compilations but for CascadeLake at least, it was mostly neutral. Below is an old test result based on a previous revision. kernbench 5.13.0-rc2 5.13.0-rc2 vanilla mm-pcpburst-v2r3 Amean elsp-2 469.22 ( 0.00%) 470.03 * -0.17%* Amean elsp-4 251.03 ( 0.00%) 250.83 ( 0.08%) Amean elsp-8 131.39 ( 0.00%) 130.89 ( 0.38%) Amean elsp-16 74.37 ( 0.00%) 75.11 ( -0.99%) Amean elsp-32 42.10 ( 0.00%) 42.20 ( -0.24%) Amean elsp-64 32.21 ( 0.00%) 32.14 ( 0.23%) Amean elsp-128 31.59 ( 0.00%) 31.68 ( -0.27%) Amean elsp-160 31.76 ( 0.00%) 31.69 ( 0.21%) A Haswell machine showed the worst results for kernbench Amean elsp-2 459.99 ( 0.00%) 465.27 * -1.15%* Amean elsp-4 250.76 ( 0.00%) 253.17 * -0.96%* Amean elsp-8 141.28 ( 0.00%) 141.78 ( -0.36%) Amean elsp-16 77.71 ( 0.00%) 77.88 ( -0.22%) Amean elsp-32 44.09 ( 0.00%) 44.40 ( -0.69%) Amean elsp-64 33.79 ( 0.00%) 33.46 ( 0.96%) Amean elsp-128 33.14 ( 0.00%) 33.26 ( -0.37%) Amean elsp-160 33.26 ( 0.00%) 33.36 * -0.30%* The series with review feedback and dealing with cpuless nodes is queued and should complete over the weekend. > Acked-by: Dave Hansen Thanks! -- Mel Gorman SUSE Labs