Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753573AbZK0Fy0 (ORCPT ); Fri, 27 Nov 2009 00:54:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751726AbZK0FyZ (ORCPT ); Fri, 27 Nov 2009 00:54:25 -0500 Received: from sparc.brc.ubc.ca ([137.82.2.12]:49290 "EHLO sparc.brc.ubc.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751045AbZK0FyZ (ORCPT ); Fri, 27 Nov 2009 00:54:25 -0500 X-Greylist: delayed 599 seconds by postgrey-1.27 at vger.kernel.org; Fri, 27 Nov 2009 00:54:25 EST Date: Thu, 26 Nov 2009 21:54:29 -0800 (PST) From: Vincent Li X-X-Sender: root@kernalhack.brc.ubc.ca To: KOSAKI Motohiro Cc: Vincent Li , LKML , linux-mm , Andrew Morton Subject: Re: [PATCH 2/4] vmscan: make lru_index() helper function In-Reply-To: <20091127144636.A7E4.A69D9226@jp.fujitsu.com> Message-ID: References: <20091127091755.A7CF.A69D9226@jp.fujitsu.com> <20091127144636.A7E4.A69D9226@jp.fujitsu.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1177 Lines: 33 On Fri, 27 Nov 2009, KOSAKI Motohiro wrote: > > > @@ -1373,10 +1378,8 @@ static void shrink_active_list(unsigned long nr_pages, struct zone *zone, > > > */ > > > reclaim_stat->recent_rotated[file] += nr_rotated; > > > > > > - move_active_pages_to_lru(zone, &l_active, > > > - LRU_ACTIVE + file * LRU_FILE); > > > - move_active_pages_to_lru(zone, &l_inactive, > > > - LRU_BASE + file * LRU_FILE); > > > + move_active_pages_to_lru(zone, &l_active, lru_index(1, file)); > > > + move_active_pages_to_lru(zone, &l_inactive, lru_index(0, file)); > > > > How about: > > move_active_pages_to_lru(zone, &l_active, lru_index(LRU_ACTIVE, file)); > > move_active_pages_to_lru(zone, &l_inactive, lru_index(LRU_BASE, file)); > > ? > > No. lru_index mean convert two boolean to one index. it shoudn't be passed > lru index itself. Yeah, you are right, I immediately realized I am wrong after replying, sorry. Vincent -- 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/