[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.10.0806241022120.2926@woody.linux-foundation.org>
Date: Tue, 24 Jun 2008 10:30:21 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Miklos Szeredi <miklos@...redi.hu>
cc: jens.axboe@...cle.com, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [rfc patch 3/4] splice: remove confirm from
pipe_buf_operations
On Tue, 24 Jun 2008, Miklos Szeredi wrote:
>
> OK it could be done, possibly at great pain. But why is it important?
> What's the use case where it matters that splice-in should not block
> on the read?
If you're splicing from one file to another, the _goal_ you should have is
that you want to have a mode where you can literally steal the page, and
never _ever_ be IO-synchronous (well, meta-data accesses will be, you
can't really avoid that sanely).
IOW, it should be possible to do a
- splice() file->pipe with SPLICE_STEAL
don't even wait for the read to finish!
- splice() pipe->file
insert the page into the destination page cache, mark it dirty
an no, we probably do not support that yet (for example, I wouldn't be
surprised if "dirty + !uptodate" is considered an error for the VM even
though the page should still be locked from the read), but it really was a
design goal.
Also, asynchronous is important even when you "just" want to overlap IO
with CPU, so even if it's going to the network, then if you can delay the
"wait for IO to complete" until the last possible moment (ie the _second_
splice, when you end up copying it into an SKB, then both your throughput
and your latency are likely going to be noticeably better, because you've
now been able to do a lot of the costly CPU work (system exit + entry at
the least, but hopefully a noticeable portion of the TCP stack too)
overlapped with the disk seeking.
So asynchronous ops was really one of the big goals for splice.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists