Re: [PATCH] mm: fix setting the high and low watermarks

2019-06-23 Thread Vlastimil Babka
On 6/21/19 4:07 PM, Bharath Vedartham wrote: > Do you think this could cause a race condition between > __setup_per_zone_wmarks and pgdat_watermark_boosted which checks whether > the watermark_boost of each zone is non-zero? pgdat_watermark_boosted is > not called with a zone lock. > Here is a prob

Re: [PATCH] mm: fix setting the high and low watermarks

2019-06-21 Thread Mel Gorman
On Fri, Jun 21, 2019 at 12:43:25PM +0100, Alan Jenkins wrote: > When setting the low and high watermarks we use min_wmark_pages(zone). > I guess this is to reduce the line length. But we forgot that this macro > includes zone->watermark_boost. We need to reset zone->watermark_boost > first. Othe

Re: [PATCH] mm: fix setting the high and low watermarks

2019-06-21 Thread Bharath Vedartham
On Fri, Jun 21, 2019 at 02:09:31PM +0200, Vlastimil Babka wrote: > On 6/21/19 1:43 PM, Alan Jenkins wrote: > > When setting the low and high watermarks we use min_wmark_pages(zone). > > I guess this is to reduce the line length. But we forgot that this macro > > includes zone->watermark_boost. We

Re: [PATCH] mm: fix setting the high and low watermarks

2019-06-21 Thread Vlastimil Babka
On 6/21/19 1:43 PM, Alan Jenkins wrote: > When setting the low and high watermarks we use min_wmark_pages(zone). > I guess this is to reduce the line length. But we forgot that this macro > includes zone->watermark_boost. We need to reset zone->watermark_boost > first. Otherwise the watermarks w

[PATCH] mm: fix setting the high and low watermarks

2019-06-21 Thread Alan Jenkins
When setting the low and high watermarks we use min_wmark_pages(zone). I guess this is to reduce the line length. But we forgot that this macro includes zone->watermark_boost. We need to reset zone->watermark_boost first. Otherwise the watermarks will be set inconsistently. E.g. this could caus