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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 3E037C04FF3 for ; Mon, 24 May 2021 16:01:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A6E54610CB for ; Mon, 24 May 2021 16:01:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A6E54610CB 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 089596B00BB; Mon, 24 May 2021 12:01:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 03833940082; Mon, 24 May 2021 12:01:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E434C940076; Mon, 24 May 2021 12:01:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0124.hostedemail.com [216.40.44.124]) by kanga.kvack.org (Postfix) with ESMTP id B30366B00BB for ; Mon, 24 May 2021 12:01:09 -0400 (EDT) Received: from smtpin38.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 4B440909B for ; Mon, 24 May 2021 16:01:09 +0000 (UTC) X-FDA: 78176588658.38.462CB64 Received: from outbound-smtp24.blacknight.com (outbound-smtp24.blacknight.com [81.17.249.192]) by imf01.hostedemail.com (Postfix) with ESMTP id 76A405001537 for ; Mon, 24 May 2021 16:00:59 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp24.blacknight.com (Postfix) with ESMTPS id F39ACC0B05 for ; Mon, 24 May 2021 17:01:02 +0100 (IST) Received: (qmail 432 invoked from network); 24 May 2021 16:01:02 -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); 24 May 2021 16:01:02 -0000 Date: Mon, 24 May 2021 17:01:01 +0100 From: Mel Gorman To: Dave Hansen Cc: Linux-MM , Dave Hansen , Matthew Wilcox , Vlastimil Babka , Michal Hocko , Nicholas Piggin , LKML Subject: Re: [PATCH 3/6] mm/page_alloc: Adjust pcp->high after CPU hotplug events Message-ID: <20210524160101.GG30378@techsingularity.net> References: <20210521102826.28552-1-mgorman@techsingularity.net> <20210521102826.28552-4-mgorman@techsingularity.net> <20210524090726.GB30378@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 76A405001537 Authentication-Results: imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.192 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net; dmarc=none X-Rspamd-Server: rspam03 X-Stat-Signature: 8p4abrekd431xyqx3u68w1mu3ksd63zu X-HE-Tag: 1621872059-112542 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 Mon, May 24, 2021 at 08:52:02AM -0700, Dave Hansen wrote: > > To address your point requires much deeper surgery. > ... > > There is value to doing something like this but it's beyond what this > > series is trying to do and doing the work without introducing regressions > > would be very difficult. > > Agreed, such a solution is outside of the scope of what this set is > trying to do. > > It would be nice to touch on this counter-intuitive property in the > changelog, and *maybe* add a WARN_ON_ONCE() if we hit an edge case. > Maybe WARN_ON_ONCE() if pcp->high gets below pcp->batch*SOMETHING. > I think it's reasonable to ensure pcp->batch is never above pcp->high so I have this in zone_highsize now + /* + * Ensure high is at least batch*4. The multiple is based on the + * historical relationship between high and batch. + */ + high = max(high, batch << 2); Performance tests are running and I'll post a v2 assuming they pass. -- Mel Gorman SUSE Labs