public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Subject: Re: [PATCH][RFC] splice support
Date: Thu, 30 Mar 2006 09:00:09 +0200	[thread overview]
Message-ID: <20060330070009.GG13476@suse.de> (raw)
In-Reply-To: <442B4447.9050700@yahoo.com.au>

On Thu, Mar 30 2006, Nick Piggin wrote:
> Hi Jens,
> 
> Looks nice!
> 
> Jens Axboe wrote:
> 
> >Hi,
> >
> >Since my initial posting back in December, I've had some private queries
> >about the state of splice support. The state was pretty much that it was
> >a little broken, if one attempted to do file | file splicing. The
> >original patch migrated pages from one file to another in this case,
> >which got vm ugly really quickly. And it wasn't always the right thing
> >to do, since it would mean that splicing file1 to file2 would move
> >file1's page cache to file2. Sometimes this is what you want, sometimes
> >it is 
> >
> 
> Page migration now generalised vmscan.c and introduced remove_mapping
> function, which should help keep things clean.

Excellent.

> Moving a page onto and off the LRU is an interesting problem, though.
> But possibly you could just leave it on the LRU and transfer the pagecache
> reference over to the pipe. vmscan would find extra pages on the LRU at
> times, but they would go away when pipe releases the page.
> 
> Moving a page from a pipe to a filesystem might be harder, because you
> don't know if it came from a filesystem (still on LRU) or not (in which
> case you need to add it to LRU). If only you can keep track of this

Well that, to me, is _the_ hard problem to solve for this. But you
sort-of do know, my plan is/was to add a ->steal() hook to the pipe
buffers that would 'unhook' the page so it was in a clean state to be
added to the LRU/page cache again. If stealing failed, just fall back to
copying (or hard error, let the flags decide).

> information as the page gets passed around... hmm the PG_private will be
> free to use because a filesystem must always drop its buffers before
> remove_mapping can run. One would also need to take care of replacing
> an existing page I guess.
> 
> Hmm... I think it can work, falling back to copies if we get stuck
> anywhere.
> 
> Unless someone beats me to it, I'll try coding something up when I get
> a bit more free time.

You are more than welcome, I hope to give it a little shot today and see
how it goes.

-- 
Jens Axboe


  reply	other threads:[~2006-03-30  7:00 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-29 12:28 [PATCH][RFC] splice support Jens Axboe
2006-03-29 12:30 ` Jens Axboe
2006-03-29 13:15 ` Jeff Garzik
2006-03-29 13:27   ` Jens Axboe
2006-03-29 21:49     ` Nathan Scott
2006-03-29 20:06   ` Linus Torvalds
2006-03-29 20:42     ` Jens Axboe
2006-03-29 20:43       ` Jens Axboe
2006-03-29 21:14         ` Linus Torvalds
2006-03-30  6:17           ` Jens Axboe
2006-03-29 22:37 ` Andrew Morton
2006-03-30  0:50   ` Linus Torvalds
2006-03-30  1:04     ` Jeff Garzik
2006-03-30  1:20       ` Andrew Morton
2006-03-30  6:18         ` Jens Axboe
2006-03-30  2:08     ` Andrew Morton
2006-03-30  3:44       ` Nick Piggin
2006-03-30  7:21       ` Jens Axboe
2006-03-30  7:30         ` Andrew Morton
2006-03-30  7:33           ` Jens Axboe
2006-03-30  8:02             ` Jan Engelhardt
2006-03-30  3:10     ` Nick Piggin
2006-03-30  7:16     ` Jens Axboe
2006-03-30  8:09     ` Jan Engelhardt
2006-03-30  7:45   ` Jens Axboe
2006-03-30  8:02     ` Andrew Morton
2006-03-30  8:10       ` Jens Axboe
2006-03-30  8:25         ` Nick Piggin
2006-03-30  8:27         ` Andrew Morton
2006-03-30  8:50           ` Nick Piggin
2006-03-30  8:51           ` Jens Axboe
2006-03-30  9:15             ` Jens Axboe
2006-03-30  9:40               ` Andrew Morton
2006-03-30  9:45                 ` Jens Axboe
2006-03-30  9:56                   ` Andrew Morton
2006-03-30 10:01                     ` Jens Axboe
2006-03-30  2:36 ` Nick Piggin
2006-03-30  7:00   ` Jens Axboe [this message]
2006-03-30  7:33     ` Nick Piggin
2006-03-30  8:54 ` KAMEZAWA Hiroyuki
2006-03-30 13:53   ` Jens Axboe
2006-03-30 14:05     ` KAMEZAWA Hiroyuki
2006-03-30 14:38       ` Jens Axboe
2006-03-30 14:55         ` KAMEZAWA Hiroyuki
  -- strict thread matches above, loose matches on Subject: below --
2005-12-19  9:16 Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060330070009.GG13476@suse.de \
    --to=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox