Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1882546ybk; Mon, 11 May 2020 06:42:21 -0700 (PDT) X-Google-Smtp-Source: APiQypIMj7tmQj7l1kJgmClf6Oo//ACkJNhpjr/EAHWZXDtp+y4tnF+iV5cmvEE290Y1rmSj0mcZ X-Received: by 2002:a17:906:ae18:: with SMTP id le24mr8388762ejb.155.1589204541006; Mon, 11 May 2020 06:42:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589204540; cv=none; d=google.com; s=arc-20160816; b=CFGk+UUUH+kU1/7D617V47C9FJKUehz/bJwH9Y+llkE/Rkr7kzeVmmk8Zx5bFHWPUR JeaLlrd7m1M+/Z2MR4U4vUiXBrTdoEXko3GfoyaT3qtduAdGJoFXVMLLciHZAaq5rD1X M6ihrGP/vrAP37Mnud2X8xOJeq2aRsarIJvo1ZTtmNf4JPGv1Gb4/VXZcxe/35UcCF2b bYTAgYoQXAJWCxwUqOL0RzFN7LJIfmP184zIU51ya9ro8d22CztjmcdwCyTWgG8btqBN +bG2DYNcivOjoQeDD0Y/e0fs6xl9xdlyiyyaMDQunLAhqAOjEABTAPTm+luZKBgL5V6s TBIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature; bh=BjnT+wQssjNt8bOOqGZ9Ke9C4pujItT6DZsy/y1cchM=; b=D3mPnc3s1NhkmRW1uAYtvyw/dzvlFEPMUmm075w2wXGyAlb6ylPEy0cDrpn+cqkc15 zcISnAMHYwHC12JdwIO5HLQS43SaYRtvuBjkyCSZQcuryncNRQoZlgYSPHsgGkbfbF4t aHYZwZ/dBrf/V6RB4AWc9ucF+OzDrPpi6Mio46dKRowNyktAelxlKppTxq3nVy3PkXR5 Dd0WpTHUSGHTUBdZ/FIZ19+BY0xN3jBFyBBb0QwgrCRxkf5L4GCMOfTDSGF7TK0zOqZL 40At9/zMET1JIM1DEPRVH3DKO0RogStruUHJ00O6uxT66IXiGupU9x3S0oIab/VeVhnT YWPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=nfc2QDHK; 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 o5si4037813edb.81.2020.05.11.06.41.51; Mon, 11 May 2020 06:42:20 -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; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=nfc2QDHK; 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 S1729659AbgEKNk2 (ORCPT + 99 others); Mon, 11 May 2020 09:40:28 -0400 Received: from mail26.static.mailgun.info ([104.130.122.26]:51143 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726115AbgEKNk2 (ORCPT ); Mon, 11 May 2020 09:40:28 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1589204427; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=BjnT+wQssjNt8bOOqGZ9Ke9C4pujItT6DZsy/y1cchM=; b=nfc2QDHKVaZBzJdKP14JvUJw+uHK8ajUwr5yQZUnBMHfSgpSoK9AkbamrC+zfY4jfRFX1paE ZlXszFyD1MlNvY/ZeYH7K0SDN+++2JOgckd7gs3O8kAWOfF0gWU+J3k4/d9PzVnjuMupHFmx XDnxWaFcaEuIv5Thtx+3prDuxps= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5eb955c4.7fe1efd24b20-smtp-out-n05; Mon, 11 May 2020 13:40:20 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 8B55EC433CB; Mon, 11 May 2020 13:40:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=ham autolearn_force=no version=3.4.0 Received: from charante-linux.qualcomm.com (blr-c-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: charante) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4786EC433F2; Mon, 11 May 2020 13:40:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4786EC433F2 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=charante@codeaurora.org From: Charan Teja Reddy To: akpm@linux-foundation.org, linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, vinmenon@codeaurora.org, Charan Teja Reddy Subject: [PATCH] mm, page_alloc: reset the zone->watermark_boost early Date: Mon, 11 May 2020 19:10:08 +0530 Message-Id: <1589204408-5152-1-git-send-email-charante@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Updating the zone watermarks by any means, like extra_free_kbytes, min_free_kbytes, water_mark_scale_factor e.t.c, when watermark_boost is set will result into the higher low and high watermarks than the user asks. This can be avoided by resetting the zone->watermark_boost to zero early. Signed-off-by: Charan Teja Reddy --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 1b265b09..822e262 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -7746,9 +7746,9 @@ static void __setup_per_zone_wmarks(void) mult_frac(zone_managed_pages(zone), watermark_scale_factor, 10000)); + zone->watermark_boost = 0; zone->_watermark[WMARK_LOW] = min_wmark_pages(zone) + tmp; zone->_watermark[WMARK_HIGH] = min_wmark_pages(zone) + tmp * 2; - zone->watermark_boost = 0; spin_unlock_irqrestore(&zone->lock, flags); } -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation