linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: jens.axboe@oracle.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [rfc patch 3/4] splice: remove confirm from pipe_buf_operations
Date: Tue, 24 Jun 2008 10:30:21 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0806241022120.2926@woody.linux-foundation.org> (raw)
In-Reply-To: <E1KB6p9-0001Gq-Fd@pomaz-ex.szeredi.hu>


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, 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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2008-06-24 17:30 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-21 15:46 [rfc patch 0/4] splice: cleanups and fixes Miklos Szeredi
2008-06-21 15:46 ` [rfc patch 1/4] splice: fix comment Miklos Szeredi, Miklos Szeredi
2008-06-21 15:46 ` [rfc patch 2/4] splice: remove steal from pipe_buf_operations Miklos Szeredi, Miklos Szeredi
2008-06-24  8:01   ` Jens Axboe
2008-06-24  8:50     ` Miklos Szeredi
2008-06-24 12:21       ` Nick Piggin
2008-06-21 15:46 ` [rfc patch 3/4] splice: remove confirm " Miklos Szeredi, Miklos Szeredi
2008-06-24  8:04   ` Jens Axboe
2008-06-24  8:54     ` Miklos Szeredi
2008-06-24 11:19       ` Jens Axboe
2008-06-24 11:36         ` Miklos Szeredi
2008-06-24 11:46           ` Evgeniy Polyakov
2008-06-24 12:02             ` Miklos Szeredi
2008-06-24 12:15               ` Evgeniy Polyakov
2008-06-24 12:16           ` Nick Piggin
2008-06-24 12:22             ` Jens Axboe
2008-06-24 13:00             ` Miklos Szeredi
2008-06-24 17:30           ` Linus Torvalds [this message]
2008-06-24 18:24             ` Miklos Szeredi
2008-06-24 18:31               ` Linus Torvalds
2008-06-24 19:05                 ` Miklos Szeredi
2008-06-24 19:17                   ` Linus Torvalds
2008-06-24 19:24                     ` Miklos Szeredi
2008-06-24 19:26                       ` Miklos Szeredi
2008-06-24 19:32                         ` Miklos Szeredi
2008-06-24 19:47                           ` Linus Torvalds
2008-06-24 20:06                             ` Miklos Szeredi
2008-06-24 19:45                       ` Linus Torvalds
2008-06-21 15:46 ` [rfc patch 4/4] splice: use do_generic_file_read() Miklos Szeredi, Miklos Szeredi
2008-06-24  8:05   ` Jens Axboe
2008-06-24 11:11     ` Miklos Szeredi

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=alpine.LFD.1.10.0806241022120.2926@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=jens.axboe@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=miklos@szeredi.hu \
    /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