From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752729Ab0JVE4A (ORCPT ); Fri, 22 Oct 2010 00:56:00 -0400 Received: from mga03.intel.com ([143.182.124.21]:59108 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752536Ab0JVEz7 (ORCPT ); Fri, 22 Oct 2010 00:55:59 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.58,221,1286175600"; d="scan'208";a="339108644" Date: Fri, 22 Oct 2010 12:55:54 +0800 From: Wu Fengguang To: Andrew Morton Cc: Neil Brown , Rik van Riel , KOSAKI Motohiro , KAMEZAWA Hiroyuki , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "Li, Shaohua" Subject: [PATCH] vmscan: comment too_many_isolated() Message-ID: <20101022045554.GA17073@localhost> References: <20101022045509.GA16804@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101022045509.GA16804@localhost> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Comment "Why it's doing so" rather than "What it does" as proposed by Andrew Morton. Reviewed-by: KOSAKI Motohiro Reviewed-by: Minchan Kim Signed-off-by: Wu Fengguang --- mm/vmscan.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- linux-next.orig/mm/vmscan.c 2010-10-19 09:29:44.000000000 +0800 +++ linux-next/mm/vmscan.c 2010-10-19 10:21:41.000000000 +0800 @@ -1142,7 +1142,11 @@ int isolate_lru_page(struct page *page) } /* - * Are there way too many processes in the direct reclaim path already? + * A direct reclaimer may isolate SWAP_CLUSTER_MAX pages from the LRU list and + * then get resheduled. When there are massive number of tasks doing page + * allocation, such sleeping direct reclaimers may keep piling up on each CPU, + * the LRU list will go small and be scanned faster than necessary, leading to + * unnecessary swapping, thrashing and OOM. */ static int too_many_isolated(struct zone *zone, int file, struct scan_control *sc)