From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail138.messagelabs.com (mail138.messagelabs.com [216.82.249.35]) by kanga.kvack.org (Postfix) with SMTP id B36BA6B006A for ; Thu, 8 Jul 2010 03:40:52 -0400 (EDT) Received: from m6.gw.fujitsu.co.jp ([10.0.50.76]) by fgwmail7.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id o687enuN019541 for (envelope-from kosaki.motohiro@jp.fujitsu.com); Thu, 8 Jul 2010 16:40:49 +0900 Received: from smail (m6 [127.0.0.1]) by outgoing.m6.gw.fujitsu.co.jp (Postfix) with ESMTP id DA75745DE55 for ; Thu, 8 Jul 2010 16:40:48 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (s6.gw.fujitsu.co.jp [10.0.50.96]) by m6.gw.fujitsu.co.jp (Postfix) with ESMTP id B7F8545DE4F for ; Thu, 8 Jul 2010 16:40:48 +0900 (JST) Received: from s6.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id 70B66E08003 for ; Thu, 8 Jul 2010 16:40:48 +0900 (JST) Received: from ml14.s.css.fujitsu.com (ml14.s.css.fujitsu.com [10.249.87.104]) by s6.gw.fujitsu.co.jp (Postfix) with ESMTP id 12B431DB8016 for ; Thu, 8 Jul 2010 16:40:48 +0900 (JST) From: KOSAKI Motohiro Subject: [PATCH v2 2/2] vmscan: shrink_slab() require number of lru_pages, not page order In-Reply-To: <20100708163401.CD34.A69D9226@jp.fujitsu.com> References: <20100708163401.CD34.A69D9226@jp.fujitsu.com> Message-Id: <20100708163934.CD37.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Thu, 8 Jul 2010 16:40:47 +0900 (JST) Sender: owner-linux-mm@kvack.org To: Christoph Lameter Cc: kosaki.motohiro@jp.fujitsu.com, LKML , linux-mm , Andrew Morton , Mel Gorman , Rik van Riel , Minchan Kim , Johannes Weiner List-ID: Fix simple argument error. Usually 'order' is very small value than lru_pages. then it can makes unnecessary icache dropping. Signed-off-by: KOSAKI Motohiro --- mm/vmscan.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 8715da1..60d813b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2617,6 +2617,8 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) n = zone_page_state(zone, NR_SLAB_RECLAIMABLE); if (n > zone->min_slab_pages) { + unsigned long lru_pages = zone_reclaimable_pages(zone); + /* * shrink_slab() does not currently allow us to determine how * many pages were freed in this zone. So we take the current @@ -2627,7 +2629,7 @@ static int __zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order) * Note that shrink_slab will free memory on all zones and may * take a long time. */ - while (shrink_slab(sc.nr_scanned, gfp_mask, order) && + while (shrink_slab(sc.nr_scanned, gfp_mask, lru_pages) && (zone_page_state(zone, NR_SLAB_RECLAIMABLE) + nr_pages > n)) ; -- 1.6.5.2 -- 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/ . Don't email: email@kvack.org