From: Jens Axboe <axboe@suse.de>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RFC] splice support
Date: Thu, 30 Mar 2006 09:16:01 +0200 [thread overview]
Message-ID: <20060330071601.GH13476@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0603291624420.27203@g5.osdl.org>
(So Linus basically handled everything here, I'll make some scattered
comments where I made changes).
On Wed, Mar 29 2006, Linus Torvalds wrote:
> > - splice() doesn't check for (len < 0), like read() and write() do.
> > Should it?
>
> Umm. More likely better to just do rw_verify_area() instead, which limits
> it to MAX_INT. Although it probably doesn't matter, for the above obvious
> reason anyway (ie we end up doing everything on a page-granular area
> anyway).
I've added rw_verify_area() calls now.
> > - what does `flags' do, anyway? The whole thing is undocumented and
> > almost uncommented.
>
> Right now "flags" doesn't do anything at all, and you should just pass in
> zero.
>
> But if we ever do a "move" vs "copy" hint, we'll want something.
Precisely. I already have something in progress for that...
> > - the tmp_page trick in anon_pipe_buf_release() seems to be unrelated to
> > the splice() work. It should be a separate patch and any peformance
> > testing (needed, please) should be decoupled from that change.
>
> It's not unrelated. Note the new "page_count() == 1" test.
Yes, this is needed to make migrating pages from a pipe to the page
cache possible.
> > - The logic in do_splice() hurts my brain. "if `in' is a pipe then
> > splice from `in-as-a-pipe' to `out' else if `out' is a pipe then splice
> > from `in' to 'out-as-a-pipe'. Make sense, I guess, but I do wonder "what
> > would happen if those tests were reversed?". Nothing, I guess.
>
> Why would it matter? If both are pipes, then one is as good as the other.
> You just want to pick the version that is potentially more efficient, if
> there is any difference (and there is).
>
> However, I don't think Jens actually did the pipe->pipe case at all (ie
> pipes don't have the "splice_read()" function yet).
No it's not there yet, coverage will increase soon :)
> >
> > - In pipe_to_file():
> >
> > - Shouldn't it be using GFP_HIGHUSER()?
>
> Some filesystems may not like having highpages.
>
> I suspect it should be "mapping_gfp_mask(mapping)".
I actually already made it GFP_HIGHUSER yesterday in a non-yet committed
patch, so I'll check up on this and make the change.
--
Jens Axboe
next prev parent reply other threads:[~2006-03-30 7:15 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 [this message]
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
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=20060330071601.GH13476@suse.de \
--to=axboe@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.