All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: torvalds@linux-foundation.org
Cc: miklos@szeredi.hu, jens.axboe@oracle.com, max@duempel.org,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 0/3] make splice more generic
Date: Mon, 11 May 2009 17:17:00 +0200	[thread overview]
Message-ID: <E1M3XFU-0001Ra-K7@pomaz-ex.szeredi.hu> (raw)
In-Reply-To: <alpine.LFD.2.01.0905070845590.4983@localhost.localdomain> (message from Linus Torvalds on Thu, 7 May 2009 08:55:03 -0700 (PDT))

On Thu, 7 May 2009, Linus Torvalds wrote:
> On Thu, 7 May 2009, Miklos Szeredi wrote:
> > 
> > One more generalization would be to allow splice to work on two
> > non-pipes, using an internal intermediate pipe, a-la do_splice_direct().
> 
> You can't do that without some painful issues.
> 
> Or rather, you can only do it trivially for the one case where we 
> _already_ do that, namely "sendfile()". That's exactly what sendfile() is 
> now.

Hmm yeah, almost exactly: sendfile doesn't have a "destination offset"
argument.

> That said, maybe we could allow it in a few more cases. Or maybe people 
> think the simplification in user interfaces is worth making the IO be 
> non-interruptible (but still killable, for example, at which point the 
> buffered data really is dropped - but that's not different from having 
> the buffers in user space, so at that point it's ok).

That's a hard decision.  I think it's better to leave it in its
current form.  That means more complexity in the apps, but less
unexpected nastiness from being non-interruptible.

One more interesting use of splice() would be for things like speeding
up "cp" on network filesystems and similarly for fs which can
refcount/COW data blocks.  Seems like BTRFS already has an ioctl for
this, wouldn't it be nice to do it with splice()?

Thanks,
Miklos

  reply	other threads:[~2009-05-11 15:18 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-07 13:37 [patch 0/3] make splice more generic Miklos Szeredi
2009-05-07 13:37 ` [patch 1/3] splice: implement pipe to pipe splicing Miklos Szeredi
2009-05-07 13:37 ` [patch 2/3] splice: implement default splice_read method Miklos Szeredi
2009-05-13  5:35   ` Andrew Morton
2009-05-13  6:37     ` Jens Axboe
2009-05-13  9:01       ` Miklos Szeredi
2009-05-14 17:29         ` Jens Axboe
2009-05-14 17:54           ` Miklos Szeredi
2009-05-14 18:00             ` Jens Axboe
2009-05-18 12:36               ` Miklos Szeredi
2009-05-19  9:38                 ` Jens Axboe
2009-05-07 13:37 ` [patch 3/3] splice: implement default splice_write method Miklos Szeredi
2009-05-07 15:55 ` [patch 0/3] make splice more generic Linus Torvalds
2009-05-11 15:17   ` Miklos Szeredi [this message]
2009-05-09 11:36 ` Max Kellermann
2009-05-11 12:12 ` Jens Axboe
2009-05-11 15:22   ` Miklos Szeredi
2009-05-14 20:27   ` Jamie Lokier
2009-05-15  7:32     ` 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=E1M3XFU-0001Ra-K7@pomaz-ex.szeredi.hu \
    --to=miklos@szeredi.hu \
    --cc=jens.axboe@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=max@duempel.org \
    --cc=torvalds@linux-foundation.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.