From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Lameter Subject: Re: [patch 10/21] buffer heads: Support slab defrag Date: Fri, 16 May 2008 10:01:38 -0700 (PDT) Message-ID: References: <20080510030831.796641881@sgi.com> <20080510030916.935905242@sgi.com> <20080512002403.GP103491721@sgi.com> <20080515231045.GY155679365@sgi.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Mel Gorman , andi@firstfloor.org, Rik van Riel , Pekka Enberg , mpm@selenic.com To: David Chinner Return-path: Received: from relay2.sgi.com ([192.48.171.30]:53074 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752523AbYEPRBo (ORCPT ); Fri, 16 May 2008 13:01:44 -0400 In-Reply-To: <20080515231045.GY155679365@sgi.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, 16 May 2008, David Chinner wrote: > On Thu, May 15, 2008 at 10:42:15AM -0700, Christoph Lameter wrote: > > On Mon, 12 May 2008, David Chinner wrote: > > > > > If you are going to clean bufferheads (or pages), please clean entire > > > mappings via ->writepages as it leads to far superior I/O patterns > > > and a far higher aggregate rate of page cleaning..... > > > > That brings up another issue: Lets say I use writepages on a large file > > (couple of gig). How much do you want to write back? > > We're out of memory. I'd suggest write backing as much as you can > without blocking. e.g. treat it like pdflush and say 1024 pages, or > like balance_dirty_pages() and write a 'write_chunk' back from the > mapping (i.e. sync_writeback_pages()). Why are we out of memory? How do you trigger such a special writeout? > Any of these are better from an I/O perspective than single page > writeback.... But then filesystem can do tricks like writing out the surrounding areas as needed. The filesystem likely can estimate better how much writeout makes sense.