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=-0.7 required=3.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 9AC40C04FF3 for ; Sat, 22 May 2021 02:19:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D06276108D for ; Sat, 22 May 2021 02:19:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D06276108D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sina.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4C1098E007D; Fri, 21 May 2021 22:19:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 44AB78E0079; Fri, 21 May 2021 22:19:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C4D28E007D; Fri, 21 May 2021 22:19:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0134.hostedemail.com [216.40.44.134]) by kanga.kvack.org (Postfix) with ESMTP id E8B128E0079 for ; Fri, 21 May 2021 22:19:36 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 62FAB585F for ; Sat, 22 May 2021 02:19:36 +0000 (UTC) X-FDA: 78167260752.15.ADB9CA6 Received: from r3-19.sinamail.sina.com.cn (r3-19.sinamail.sina.com.cn [202.108.3.19]) by imf23.hostedemail.com (Postfix) with SMTP id E7957A0001C5 for ; Sat, 22 May 2021 02:19:30 +0000 (UTC) Received: from unknown (HELO localhost.localdomain)([222.130.247.100]) by sina.com (172.16.97.35) with ESMTP id 60A86A3000014D04; Sat, 22 May 2021 10:19:30 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com X-SMAIL-MID: 74218715073485 From: Hillf Danton To: Mel Gorman Cc: Linux-MM , Dave Hansen , Matthew Wilcox , Vlastimil Babka , Michal Hocko , Nicholas Piggin , LKML Subject: Re: [PATCH 6/6] mm/page_alloc: Introduce vm.percpu_pagelist_high_fraction Date: Sat, 22 May 2021 10:19:17 +0800 Message-Id: <20210522021917.14444-1-hdanton@sina.com> In-Reply-To: <20210521102826.28552-7-mgorman@techsingularity.net> References: <20210521102826.28552-1-mgorman@techsingularity.net> MIME-Version: 1.0 Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf23.hostedemail.com: domain of hdanton@sina.com designates 202.108.3.19 as permitted sender) smtp.mailfrom=hdanton@sina.com X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: E7957A0001C5 X-Stat-Signature: dpsit3396qh6j7a9rk68z9q9q5nzr35h X-HE-Tag: 1621649970-828806 Content-Transfer-Encoding: quoted-printable 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, 21 May 2021 11:28:26 +0100 Mel Gorman wrote: > /* > * Calculate and set new high and batch values for all per-cpu pagesets= of a >- * zone based on the zone's size. >+ * zone based on the zone's size and the percpu_pagelist_high_fraction = sysctl. > */ It is the comment fitting zone_highsize() more. > static void zone_set_pageset_high_and_batch(struct zone *zone, int cpu_= online) > { > int new_high, new_batch; >=20 >+ if (!percpu_pagelist_high_fraction) { >+ new_high =3D zone_highsize(zone, low_wmark_pages(zone), cpu_online); >+ } else { >+ new_high =3D zone_highsize(zone, >+ zone_managed_pages(zone) / percpu_pagelist_high_fraction, >+ cpu_online); >+ } >+ Nit, move percpu_pagelist_high_fraction into zone_highsize() instead of cluttering up here because >+The batch value of each per cpu pagelist remains the same regardless of= the >+value of the high fraction so allocation latencies are unaffected.