Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp532280pxj; Fri, 28 May 2021 09:19:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxu6F4g/aYgwzW/eOo11Eth2DDen9CPc7cklwG4uPJ/RM6OqcC8uFDk2Q2UBDHQ5DaB421/ X-Received: by 2002:a17:906:4812:: with SMTP id w18mr9718482ejq.4.1622218797883; Fri, 28 May 2021 09:19:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622218797; cv=none; d=google.com; s=arc-20160816; b=cky8lQVlOtWyB1lQJtLpC2iK5aTd2UUpg9lUetx38kuAR37uu5JzXzcvPmyUxxPcEH DzpkvXAZFUlDBRM2j0M/LFVWAwX6ztNH2icGNsYBEJXKOOWJqDKwAtJSivD6XJmSI/1u sxHQWAy6ptdNqPEYDCpWle9fhZMGZOSccMRhfmt4Ted5dql8Ha7n1jwysKbdAZ/xqHp/ 1fvD018I3xXq1ES1l22b6U3RDskYi8KEFd31PxnRGNQ+7k1oOM3KmKxZEPA/PsdKWNxh 1n1IWDjkJi8XRvxOT4gig8wyzhbiqZyk2LBOwMHJGKoUkF4VSZvsp8oki0yTX2TLzKnr iBvg== 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=O/3gsqoZGpHcjBlpPmQ4f5xbKeRDaFTGswwvoOZ5BNc=; b=vny48Rg+YTRcVw27iaWl9E1HquLvT4oo583LjwhEpeiC0/70xwmrnwmx9XJDYVtDx1 X+don+tQZxT4fCLIyMOWCpWs3igeI0wbWXMAiz0pt6qkWLdNlIqGKL9dhsZYSAibWmJG YQcbH3cAyJbOYZiqt6uqd7YdIfoF5mzoBD7wcRayPKwkxLEuFGGwL/6Q1oPNf4ZvLDgH m+plMG4u2Yb0Zaxv2/sVyUVtTdc5O/+ItGhx4nTvLlz2aAWLtY71V63ptMGb3tSVZ/Yb bW3ip8vv8Ve3Qyv1Qo2qC6kajpeFiPAhoWGrS7+Lfh7TtNrWcYtN96PNmUAkKMYXvJhT aGog== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hs26si4768597ejc.307.2021.05.28.09.19.34; Fri, 28 May 2021 09:19:57 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235607AbhE1PUP (ORCPT + 99 others); Fri, 28 May 2021 11:20:15 -0400 Received: from outbound-smtp37.blacknight.com ([46.22.139.220]:55263 "EHLO outbound-smtp37.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229684AbhE1PUM (ORCPT ); Fri, 28 May 2021 11:20:12 -0400 Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp37.blacknight.com (Postfix) with ESMTPS id DE78618E2 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) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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