Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932220AbWAEVWM (ORCPT ); Thu, 5 Jan 2006 16:22:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932226AbWAEVWL (ORCPT ); Thu, 5 Jan 2006 16:22:11 -0500 Received: from hera.kernel.org ([140.211.167.34]:33154 "EHLO hera.kernel.org") by vger.kernel.org with ESMTP id S932220AbWAEVWK (ORCPT ); Thu, 5 Jan 2006 16:22:10 -0500 Date: Thu, 5 Jan 2006 17:21:56 -0200 From: Marcelo Tosatti To: Wu Fengguang Cc: linux-kernel@vger.kernel.org, Andrew Morton , Christoph Lameter , Rik van Riel , Peter Zijlstra , Magnus Damm , Nick Piggin , Andrea Arcangeli Subject: Re: [PATCH 09/16] mm: remove unnecessary variable and loop Message-ID: <20060105192156.GA12589@dmt.cnet> References: <20051207104755.177435000@localhost.localdomain> <20051207105106.887005000@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051207105106.887005000@localhost.localdomain> User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 997 Lines: 28 On Wed, Dec 07, 2005 at 06:48:04PM +0800, Wu Fengguang wrote: > shrink_cache() and refill_inactive_zone() do not need loops. > > Simplify them to scan one chunk at a time. Hi Wu, What is the purpose of scanning large chunks at a time? Some drawbacks that I can think of by doing that: - zone->lru_lock will be held for much longer periods, resulting in decreased responsiveness and possibly slowdowns. - if the task doing the scan is uncapable of certain operations, for instance IO, dirty pages will be moved back to the head of the inactive list in much larger batches then they were before. This could hurt reclaim in general. What were the results of this change? Particularly contention on the lru_lock on medium-large SMP systems. Thanks! - 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/