Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754605Ab0LJCi0 (ORCPT ); Thu, 9 Dec 2010 21:38:26 -0500 Received: from mail-iw0-f172.google.com ([209.85.214.172]:38159 "EHLO mail-iw0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754546Ab0LJCiY (ORCPT ); Thu, 9 Dec 2010 21:38:24 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=VTdaUnkBmH+C+Jw0TwBXfqWQDjNRIUnirBihvNc2lEaqgOyqrK3L6SNM9SxMr83ljP bw96QQIF5HFA+K3WXltSbDdCDyXckt12YeYcFUVeIVfIYid8ZO8NBZPbpaMUDjKo7W0D kM+go3Pu39YS+C4kWAbnP5HiDXyrnoynhgcCc= MIME-Version: 1.0 In-Reply-To: <1291893500-12342-7-git-send-email-mel@csn.ul.ie> References: <1291893500-12342-1-git-send-email-mel@csn.ul.ie> <1291893500-12342-7-git-send-email-mel@csn.ul.ie> Date: Fri, 10 Dec 2010 11:38:23 +0900 Message-ID: Subject: Re: [PATCH 6/6] mm: kswapd: Use the classzone idx that kswapd was using for sleeping_prematurely() From: Minchan Kim To: Mel Gorman Cc: Simon Kirby , KOSAKI Motohiro , Shaohua Li , Dave Hansen , Johannes Weiner , Andrew Morton , linux-mm , linux-kernel Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1321 Lines: 28 On Thu, Dec 9, 2010 at 8:18 PM, Mel Gorman wrote: > When kswapd is woken up for a high-order allocation, it takes account of > the highest usable zone by the caller (the classzone idx). During > allocation, this index is used to select the lowmem_reserve[] that > should be applied to the watermark calculation in zone_watermark_ok(). > > When balancing a node, kswapd considers the highest unbalanced zone to be the > classzone index. This will always be at least be the callers classzone_idx > and can be higher. However, sleeping_prematurely() always considers the > lowest zone (e.g. ZONE_DMA) to be the classzone index. This means that > sleeping_prematurely() can consider a zone to be balanced that is unusable > by the allocation request that originally woke kswapd. This patch changes > sleeping_prematurely() to use a classzone_idx matching the value it used > in balance_pgdat(). > > Signed-off-by: Mel Gorman Reviewed-by: Minchan Kim Nice catch! and it does make sense to me. -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/