linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm, page_alloc: reset the zone->watermark_boost early
@ 2020-05-11 13:40 Charan Teja Reddy
  2020-05-11 20:11 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Charan Teja Reddy @ 2020-05-11 13:40 UTC (permalink / raw)
  To: akpm, linux-mm; +Cc: linux-kernel, vinmenon, Charan Teja Reddy

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 <charante@codeaurora.org>
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-05-13 22:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 13:40 [PATCH] mm, page_alloc: reset the zone->watermark_boost early Charan Teja Reddy
2020-05-11 20:11 ` Andrew Morton
2020-05-12 13:31   ` Charan Teja Kalla
2020-05-13  9:46     ` Charan Teja Kalla
2020-05-13 22:24       ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).