From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail143.messagelabs.com (mail143.messagelabs.com [216.82.254.35]) by kanga.kvack.org (Postfix) with SMTP id 2BACA6B01D1 for ; Tue, 18 May 2010 12:13:12 -0400 (EDT) Date: Wed, 19 May 2010 02:13:08 +1000 From: Nick Piggin Subject: Re: Unexpected splice "always copy" behavior observed Message-ID: <20100518161308.GL2516@laptop> References: <20100518153440.GB7748@Krystal> <20100518155135.GJ2516@laptop> <20100518160051.GK2516@laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100518160051.GK2516@laptop> Sender: owner-linux-mm@kvack.org To: Christoph Lameter Cc: Mathieu Desnoyers , Peter Zijlstra , Steven Rostedt , Frederic Weisbecker , Pierre Tardy , Ingo Molnar , Arnaldo Carvalho de Melo , Tom Zanussi , Paul Mackerras , linux-kernel@vger.kernel.org, arjan@infradead.org, ziga.mahkovec@gmail.com, davem , linux-mm@kvack.org, Andrew Morton , KOSAKI Motohiro , Tejun Heo , Jens Axboe , Linus Torvalds List-ID: On Wed, May 19, 2010 at 02:00:51AM +1000, Nick Piggin wrote: > On Tue, May 18, 2010 at 10:56:24AM -0500, Christoph Lameter wrote: > > On Wed, 19 May 2010, Nick Piggin wrote: > > > > > What would be needed is to have filesystem maintainers go through and > > > enable it on a case by case basis. It's trivial for tmpfs/ramfs type > > > filesystems and I have a patch for those, but I never posted it on.yet. > > > Even basic buffer head filesystems IIRC get a little more complex -- > > > but we may get some milage just out of invalidating the existing > > > pagecache rather than getting fancy and trying to move buffers over > > > to the new page. > > > > There is a "migration" address space operation for moving pages. Page > > migration requires that in order to be able to move dirty pages. Can > > splice use that? > > Hmm yes I didn't think of that, it probably could. It's not the only requirement, of course, just that it could potentially reuse some of the code. The big difference is that the source page is already dirty, and the destination page might not exist, might exist and be partially uptodate, not have blocks allocated, might be past i_size, fully uptodate, etc. So it's more than a matter of just a simple copy to another page and taking over exactly the same filesystem state as the old page. -- 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