[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200511131155.0b40ee443c3367e8f748b16f@linux-foundation.org>
Date: Mon, 11 May 2020 13:11:55 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Charan Teja Reddy <charante@...eaurora.org>
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
vinmenon@...eaurora.org
Subject: Re: [PATCH] mm, page_alloc: reset the zone->watermark_boost early
On Mon, 11 May 2020 19:10:08 +0530 Charan Teja Reddy <charante@...eaurora.org> wrote:
> 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.
Does this solve some problem which has been observed in testing?
> ...
>
> --- 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);
> }
This could only be a problem if code is accessing these things without
holding zone->lock. Is that ever the case?
Powered by blists - more mailing lists