Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp305323rdb; Thu, 19 Oct 2023 05:17:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGVn0h6dOqKN6JJPusDGsZMmkLXlT/VUqkKhSOdes3R04rZ1tAY+MPj2VAdBUZd73UCDAVW X-Received: by 2002:a17:90b:528c:b0:27c:f1f8:261f with SMTP id si12-20020a17090b528c00b0027cf1f8261fmr1909869pjb.20.1697717838353; Thu, 19 Oct 2023 05:17:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697717838; cv=none; d=google.com; s=arc-20160816; b=Kf3nNQEHAY9dsq7mAob3iCVi2UaqHGVFnnMdqo9p5rXPl9l7rvZLpLYj8wRGmLGbx6 Hw8E4FB9LPZcgSa/ja4lsQHskVVxCg8fT9nY7sN0ZPlhcjOIEjybKhVxCGCiYdfMziab cbhpnRPMagaAb82d6j6E99Z6tYF3tNSHh7JPFi2DAGRrVrZBT1XgkCFsKjmtzVZrzmJR U0OR4d1c8gmR6yvnyLpAOkXUpVPjbxsffQivF3Jq/dAx4KbYT+0hFBoWA5Yhsxxpzx79 PUu6fKIDKSsDLdPeYqEeiNOKJy2weJVaSdjjb7GLlzGTYVEcO453OM3+dAST3FSrEHDm P7Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=uTMd1UOxToV26Q3ZVYlREW760XWEvDglTngjVRILg1c=; fh=HR4DBHbif49FM8LxiYZcqJ7T0XBSkbhO9SOtYE6LAJA=; b=mXDdELW+moNGTg7pFTG6jcg1p1y+uav9p7Nqx5yzCni1AV5pNXuaGzTaGtvs1T5vtn KdOYXIetO7jBAwmx20XzDqOS0N33h0QGCMC2I9/esOqhW9guxIe4AE79q1Sv9MvK1mj7 p4U79iY1Hr210mhvA+WevsouDgu7dZ8QJ63kiyJIpZKwjsD+QYJtpPKaCkBp27ZHKT4k IdgbMQHf2xlunRr/u+eP4kBvVhTI46GeVBn6zHiPc4tgrqeE3VoJFaxHY6anBXG9qPyB Y3jKG1/Ym4EtKSJp3vPln8QYOT7Q4YkWzwmIKazxU63Wh3ib/1LX1nzAkpPqIKQqb9x2 J3zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id mg11-20020a17090b370b00b00277453e82fesi1945617pjb.87.2023.10.19.05.17.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 05:17:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id CD85480E761A; Thu, 19 Oct 2023 05:16:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233195AbjJSMQt (ORCPT + 99 others); Thu, 19 Oct 2023 08:16:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233166AbjJSMQr (ORCPT ); Thu, 19 Oct 2023 08:16:47 -0400 Received: from outbound-smtp41.blacknight.com (outbound-smtp41.blacknight.com [46.22.139.224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08462A3 for ; Thu, 19 Oct 2023 05:16:44 -0700 (PDT) Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp41.blacknight.com (Postfix) with ESMTPS id 84DB420D4 for ; Thu, 19 Oct 2023 13:16:43 +0100 (IST) Received: (qmail 8912 invoked from network); 19 Oct 2023 12:16:43 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.199.31]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 19 Oct 2023 12:16:43 -0000 Date: Thu, 19 Oct 2023 13:16:40 +0100 From: Mel Gorman To: Huang Ying Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Arjan Van De Ven , Vlastimil Babka , David Hildenbrand , Johannes Weiner , Dave Hansen , Michal Hocko , Pavel Tatashin , Matthew Wilcox , Christoph Lameter Subject: Re: [PATCH -V3 6/9] mm: add framework for PCP high auto-tuning Message-ID: <20231019121640.ao2zvxlspgfkbwsr@techsingularity.net> References: <20231016053002.756205-1-ying.huang@intel.com> <20231016053002.756205-7-ying.huang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20231016053002.756205-7-ying.huang@intel.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 19 Oct 2023 05:16:56 -0700 (PDT) On Mon, Oct 16, 2023 at 01:29:59PM +0800, Huang Ying wrote: > The page allocation performance requirements of different workloads > are usually different. So, we need to tune PCP (per-CPU pageset) high > to optimize the workload page allocation performance. Now, we have a > system wide sysctl knob (percpu_pagelist_high_fraction) to tune PCP > high by hand. But, it's hard to find out the best value by hand. And > one global configuration may not work best for the different workloads > that run on the same system. One solution to these issues is to tune > PCP high of each CPU automatically. > > This patch adds the framework for PCP high auto-tuning. With it, > pcp->high of each CPU will be changed automatically by tuning > algorithm at runtime. The minimal high (pcp->high_min) is the > original PCP high value calculated based on the low watermark pages. > While the maximal high (pcp->high_max) is the PCP high value when > percpu_pagelist_high_fraction sysctl knob is set to > MIN_PERCPU_PAGELIST_HIGH_FRACTION. That is, the maximal pcp->high > that can be set via sysctl knob by hand. > > It's possible that PCP high auto-tuning doesn't work well for some > workloads. So, when PCP high is tuned by hand via the sysctl knob, > the auto-tuning will be disabled. The PCP high set by hand will be > used instead. > > This patch only adds the framework, so pcp->high will be set to > pcp->high_min (original default) always. We will add actual > auto-tuning algorithm in the following patches in the series. > > Signed-off-by: "Huang, Ying" Acked-by: Mel Gorman -- Mel Gorman SUSE Labs