Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753708Ab1D1Kuc (ORCPT ); Thu, 28 Apr 2011 06:50:32 -0400 Received: from cantor2.suse.de ([195.135.220.15]:34806 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751864Ab1D1Kub (ORCPT ); Thu, 28 Apr 2011 06:50:31 -0400 Date: Thu, 28 Apr 2011 11:50:27 +0100 From: Mel Gorman To: Minchan Kim Cc: Andrew Morton , linux-mm , LKML , Christoph Lameter , Johannes Weiner , KAMEZAWA Hiroyuki , KOSAKI Motohiro , Rik van Riel , Andrea Arcangeli Subject: Re: [RFC 5/8] compaction: remove active list counting Message-ID: <20110428105027.GT4658@suse.de> References: <2b79bbf9ddceb73624f49bbe9477126147d875fd.1303833417.git.minchan.kim@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <2b79bbf9ddceb73624f49bbe9477126147d875fd.1303833417.git.minchan.kim@gmail.com> 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 Content-Length: 1307 Lines: 29 On Wed, Apr 27, 2011 at 01:25:22AM +0900, Minchan Kim wrote: > acct_isolated of compaction uses page_lru_base_type which returns only > base type of LRU list so it never returns LRU_ACTIVE_ANON or LRU_ACTIVE_FILE. > So it's pointless to add lru[LRU_ACTIVE_[ANON|FILE]] to get sum. > > Cc: KOSAKI Motohiro > Cc: Mel Gorman > Cc: Rik van Riel > Cc: Andrea Arcangeli > Signed-off-by: Minchan Kim hmm, isolate_migratepages() is doing a linear scan of PFNs and is calling __isolate_lru_page(..ISOLATE_BOTH..). Using page_lru_base_type happens to work because we're only interested in the number of isolated pages and your patch still covers that. Using page_lru might be more accurate in terms of accountancy but does not seem necessary. Adding a comment explaining why we account for it as inactive and why that's ok would be nice although I admit this is something I should have done when acct_isolated() was introduced. -- Mel Gorman SUSE Labs -- 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/