Re: [PATCH 3/4] mm: vmscan: Evaluate the watermarks against the correct classzone
From: Minchan Kim <hidden>
Date: 2011-06-28 23:23:16
Also in:
lkml
On Tue, Jun 28, 2011 at 9:52 PM, Mel Gorman [off-list ref] wrote:
On Mon, Jun 27, 2011 at 03:53:04PM +0900, Minchan Kim wrote:quoted
On Fri, Jun 24, 2011 at 11:44 PM, Mel Gorman [off-list ref] wrote:quoted
When deciding if kswapd is sleeping prematurely, the classzone is taken into account but this is different to what balance_pgdat() and the allocator are doing. Specifically, the DMA zone will be checked based on the classzone used when waking kswapd which could be for a GFP_KERNEL or GFP_HIGHMEM request. The lowmem reserve limit kicks in, the watermark is not met and kswapd thinks its sleeping prematurely keeping kswapd awake in error.I thought it was intentional when you submitted a patch firstly.It was, it also wasn't right.quoted
"Kswapd makes sure zones include enough free pages(ie, include reserve limit of above zones). But you seem to see DMA zone can't meet above requirement forever in some situation so that kswapd doesn't sleep. Right?Right.quoted
quoted
Reported-and-tested-by: Pádraig Brady <redacted> Signed-off-by: Mel Gorman <mgorman@suse.de> --- mm/vmscan.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)diff --git a/mm/vmscan.c b/mm/vmscan.c index 9cebed1..a76b6cc2 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c@@ -2341,7 +2341,7 @@ static bool sleeping_prematurely(pg_data_t *pgdat, int order, long remaining,} if (!zone_watermark_ok_safe(zone, order, high_wmark_pages(zone), - classzone_idx, 0)) + i, 0))Isn't it better to use 0 instead of i?I considered it but went with i to compromise between making sure zones included enough free pages without requiring that ZONE_DMA meet an almost impossible requirement when under continual memory pressure.
I see. Thanks, Mel. -- Kind regards, Minchan Kim -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>