Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79684d97 authored by Charan Teja Reddy's avatar Charan Teja Reddy
Browse files

mm: set the watermark_boost before updating the low and high wmarks



Updating the zone watermarks by any means, like extra_free_kbytes,
min_free_kbytes, water_mark_scale_factor, when boost_watermark(zone) is
set can result into the higher water_mark_low|min as the macro
min_wmark_pages returns by adding the zone->watermark_boost.
Set this to Zero early.

Change-Id: I5e3edd1798e46974f3df34ef750f9d08b8ff35f4
Signed-off-by: default avatarCharan Teja Reddy <charante@codeaurora.org>
parent c7448bfb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7644,11 +7644,11 @@ static void __setup_per_zone_wmarks(void)
			    mult_frac(zone->managed_pages,
				      watermark_scale_factor, 10000));

		zone->watermark_boost = 0;
		zone->_watermark[WMARK_LOW]  = min_wmark_pages(zone) +
					low + min;
		zone->_watermark[WMARK_HIGH] = min_wmark_pages(zone) +
					low + min * 2;
		zone->watermark_boost = 0;

		spin_unlock_irqrestore(&zone->lock, flags);
	}