From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail6.bemta7.messagelabs.com (mail6.bemta7.messagelabs.com [216.82.255.55]) by kanga.kvack.org (Postfix) with ESMTP id 2FE3C6B00EF for ; Mon, 27 Jun 2011 02:53:06 -0400 (EDT) Received: by qwa26 with SMTP id 26so2987828qwa.14 for ; Sun, 26 Jun 2011 23:53:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1308926697-22475-4-git-send-email-mgorman@suse.de> References: <1308926697-22475-1-git-send-email-mgorman@suse.de> <1308926697-22475-4-git-send-email-mgorman@suse.de> Date: Mon, 27 Jun 2011 15:53:04 +0900 Message-ID: Subject: Re: [PATCH 3/4] mm: vmscan: Evaluate the watermarks against the correct classzone From: Minchan Kim Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-mm@kvack.org List-ID: To: Mel Gorman Cc: Andrew Morton , =?UTF-8?Q?P=C3=A1draig_Brady?= , James Bottomley , Colin King , Andrew Lutomirski , Rik van Riel , Johannes Weiner , linux-mm , linux-kernel On Fri, Jun 24, 2011 at 11:44 PM, Mel Gorman wrote: > 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. "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? > > Reported-and-tested-by: P=C3=A1draig Brady > Signed-off-by: Mel Gorman > --- > =C2=A0mm/vmscan.c | =C2=A0 =C2=A02 +- > =C2=A01 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, > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0} > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!zone_watermar= k_ok_safe(zone, order, high_wmark_pages(zone), > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 classzone_idx, 0)) > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 i, 0)) Isn't it better to use 0 instead of i? --=20 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: email@kvack.org