From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752175Ab1GSQJO (ORCPT ); Tue, 19 Jul 2011 12:09:14 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:53077 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752088Ab1GSQJM (ORCPT ); Tue, 19 Jul 2011 12:09:12 -0400 Date: Wed, 20 Jul 2011 01:09:03 +0900 From: Minchan Kim To: Mel Gorman Cc: Andrew Morton , =?iso-8859-1?Q?P=E1draig?= Brady , James Bottomley , Colin King , Andrew Lutomirski , Rik van Riel , Johannes Weiner , linux-mm , linux-kernel Subject: Re: [PATCH 4/4] mm: vmscan: Only read new_classzone_idx from pgdat when reclaiming successfully Message-ID: <20110719160903.GA2978@barrios-desktop> References: <1308926697-22475-1-git-send-email-mgorman@suse.de> <1308926697-22475-5-git-send-email-mgorman@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1308926697-22475-5-git-send-email-mgorman@suse.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mel, Too late review. At that time, I had no time to look into this patch. On Fri, Jun 24, 2011 at 03:44:57PM +0100, Mel Gorman wrote: > During allocator-intensive workloads, kswapd will be woken frequently > causing free memory to oscillate between the high and min watermark. > This is expected behaviour. Unfortunately, if the highest zone is > small, a problem occurs. > > When balance_pgdat() returns, it may be at a lower classzone_idx than > it started because the highest zone was unreclaimable. Before checking Yes. > if it should go to sleep though, it checks pgdat->classzone_idx which > when there is no other activity will be MAX_NR_ZONES-1. It interprets Yes. > this as it has been woken up while reclaiming, skips scheduling and Hmm. I can't understand this part. If balance_pgdat returns lower classzone and there is no other activity, new_classzone_idx is always MAX_NR_ZONES - 1 so that classzone_idx would be less than new_classzone_idx. It means it doesn't skip scheduling. Do I miss something? -- Kinds regards, Minchan Kim