From patchwork Mon May 11 13:40:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Charan Teja Kalla X-Patchwork-Id: 11540751 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 80592912 for ; Mon, 11 May 2020 13:40:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4C8C2206F9 for ; Mon, 11 May 2020 13:40:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="BxveEMFd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C8C2206F9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 804E9900052; Mon, 11 May 2020 09:40:24 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 7B4BC900036; Mon, 11 May 2020 09:40:24 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6CA94900052; Mon, 11 May 2020 09:40:24 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0023.hostedemail.com [216.40.44.23]) by kanga.kvack.org (Postfix) with ESMTP id 52F9C900036 for ; Mon, 11 May 2020 09:40:24 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 04F24181AEF09 for ; Mon, 11 May 2020 13:40:24 +0000 (UTC) X-FDA: 76804547568.01.pen64_3d851fc2dc82c X-Spam-Summary: 2,0,0,78f7cdabce75e414,d41d8cd98f00b204,bounce+d06763.be9e4a-linux-mm=kvack.org@mg.codeaurora.org,,RULES_HIT:41:355:379:541:800:960:966:973:988:989:1260:1345:1437:1534:1541:1711:1730:1747:1777:1792:2196:2199:2393:2540:2559:2562:2693:3138:3139:3140:3141:3142:3352:3865:3866:3867:3868:3871:4321:4385:4605:5007:6119:6261:6653:7903:10004:11026:11218:11232:11658:11914:12043:12198:12296:12297:12438:12517:12519:12555:12986:13069:13311:13357:14181:14384:14394:14721:21080:21451:21627:21795:21972:30012:30051:30054:30070,0,RBL:104.130.122.26:@mg.codeaurora.org:.lbl8.mailshell.net-64.201.201.201 62.14.0.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:ft,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: pen64_3d851fc2dc82c X-Filterd-Recvd-Size: 3557 Received: from mail26.static.mailgun.info (mail26.static.mailgun.info [104.130.122.26]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Mon, 11 May 2020 13:40:22 +0000 (UTC) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1589204423; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=BjnT+wQssjNt8bOOqGZ9Ke9C4pujItT6DZsy/y1cchM=; b=BxveEMFduk1Nk2WlNi6DjFlHnBHKsB+9bhWtoR2Dobarl4HkrwzG1bfH3PVxDWnS/X2/akE3 S5v9xHYMEVggVaGJxSilOUqp3fhQq/n7G6MxQrRTOxA+5+P/XNmMDeZ1sDpuq1DPtAwhyVOi udEC1vgeiWWTDh71QpoZoQi7gN8= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyIwY2Q3OCIsICJsaW51eC1tbUBrdmFjay5vcmciLCAiYmU5ZTRhIl0= 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 5eb955c3.7f776b7f9b90-smtp-out-n02; Mon, 11 May 2020 13:40:19 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id B1881C432C2; 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=unavailable 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 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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); }