Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp738155ybi; Fri, 21 Jun 2019 07:21:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqx6xeJ6Fre2DAEBlBawghWEeM5+GqGUP0N827zLVesYOBDd/jKx+G2x6SGdKQWb9CvZJ5Vh X-Received: by 2002:a17:90a:2562:: with SMTP id j89mr6983225pje.123.1561126886699; Fri, 21 Jun 2019 07:21:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561126886; cv=none; d=google.com; s=arc-20160816; b=LLK7BjBf3SRoJiKLQ8noaoU1FJGMABjheSGTKsdbmX/oxp9AQiml/Ifa41k7Hp+X0x QGI15Z0qLdIxGxULACQCDHat6mMLG2u7e6oW/kauudC8SWuA94Wj6C4TFha6mVQcvBBw jFLGmJWu0k0k9+6xu4qyCeCoGIKvu3QPKegbaPP8WiyesoIF/E810SYjzawX+ltHx22M E2fh2JSmSFy1IzZBt3X35LR8Q2CMEA7Pt1jNA4tbKIiKWGXBfT8Ekv5Oluved5K9LDl3 D69SeCGxo1gBlQwramxe/tlxDIsQY5vpz+rCbfTb+RopjP1MtKCFrFmuGplVXGC3Q5gL 2Dpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=IhUv8kOzmd5g1pqwwhiqADXNfS0X3pC2GAimunNacSQ=; b=xQUqKVlG/7m+bq383Kc389/BxjHnN5ABeWdde82U8KLZcvZu/RwJoGP9vc/sZqY6QE ZhegiPjq1sX5rjmWI8KEBlEmLs3ngysGYQgzsb8cbyD37pkUc4ZfzwB6n+ub0lBuRPvS 4+IryMmfB/PSKqXvXh19LR2+E7TFQVZTD4iOIsIsA+KGbK4X3CVdDUCExX3y136daSIc adGxGZ379PE1k3b5Cs83IeSbRyiIjX/qe02VJTWCfPRwt+dIj/6CAziu1LrWpNY+VsMH 2Ze1qaRzfvBYTQ5Ek8qCiocjWsPGGL+P32Y44jX2ohB+gIopUDt0QZB/pU/NUyOEjCkY eZsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e4si2758053pjs.104.2019.06.21.07.21.11; Fri, 21 Jun 2019 07:21:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726382AbfFUOUx (ORCPT + 99 others); Fri, 21 Jun 2019 10:20:53 -0400 Received: from outbound-smtp26.blacknight.com ([81.17.249.194]:54238 "EHLO outbound-smtp26.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726031AbfFUOUx (ORCPT ); Fri, 21 Jun 2019 10:20:53 -0400 Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp26.blacknight.com (Postfix) with ESMTPS id 695C2B8862 for ; Fri, 21 Jun 2019 15:20:51 +0100 (IST) Received: (qmail 22845 invoked from network); 21 Jun 2019 14:20:51 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.21.36]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 21 Jun 2019 14:20:51 -0000 Date: Fri, 21 Jun 2019 15:16:33 +0100 From: Mel Gorman To: Alan Jenkins Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] mm: fix setting the high and low watermarks Message-ID: <20190621141633.GA2978@techsingularity.net> References: <20190621114325.711-1-alan.christopher.jenkins@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20190621114325.711-1-alan.christopher.jenkins@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 21, 2019 at 12:43:25PM +0100, Alan Jenkins wrote: > When setting the low and high watermarks we use min_wmark_pages(zone). > I guess this is to reduce the line length. But we forgot that this macro > includes zone->watermark_boost. We need to reset zone->watermark_boost > first. Otherwise the watermarks will be set inconsistently. > > E.g. this could cause inconsistent values if the watermarks have been > boosted, and then you change a sysctl which triggers > __setup_per_zone_wmarks(). > > I strongly suspect this explains why I have seen slightly high watermarks. > Suspicious-looking zoneinfo below - notice high-low != low-min. > > Node 0, zone Normal > pages free 74597 > min 9582 > low 34505 > high 36900 > > https://unix.stackexchange.com/questions/525674/my-low-and-high-watermarks-seem-higher-than-predicted-by-documentation-sysctl-vm/525687 > > Signed-off-by: Alan Jenkins > Fixes: 1c30844d2dfe ("mm: reclaim small amounts of memory when an external > fragmentation event occurs") > Cc: stable@vger.kernel.org Either way Acked-by: Mel Gorman -- Mel Gorman SUSE Labs