linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Dave Chinner <david@fromorbit.com>
Cc: Jeremy Allison <jra@samba.org>,
	Ric Wheeler <ricwheeler@gmail.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Hannes Reinecke <hare@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-nfs@vger.kernel.org, Joel Becker <jlbec@evilplan.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>
Subject: Re: copy offload support in Linux - new system call needed?
Date: Mon, 19 Dec 2011 15:29:50 -0800	[thread overview]
Message-ID: <4EEFC8EE.70001@zytor.com> (raw)
In-Reply-To: <20111219225722.GS23662@dastard>

On 12/19/2011 02:57 PM, Dave Chinner wrote:
> 
> That was my immediate thought, but sendfile has plumbing that is
> page cache based and we require completely different infrastructure
> and semantics for an array offload.
> 

The plumbing is internal to the kernel and doesn't mean we have to use
the same VFS methods.

> e.g. for an array offload, we have to flush the source file page
> cache first so that the data being copied is known to be on disk,
> then invalidate the destination page cache if overwriting or extend
> and pre-allocate blocks if not. Then we have to map both files and
> hand that off to the array.
> 
> Then there's a whole bunch of tricky questions about what the state
> of the destination file should look like while the copy is in
> progress, whether the source file should be allowed to change (e.g.
> it can't be truncated and have blocks freed and then reused by other
> files half way through the copy offload operation), and so on.
> 
> sendfile() has well known, fixed semantics that we can't change to
> suit what is needed for an offload operation that could potentially
> take hours to complete. Hence I think an new syscall is the way to
> go....

Perhaps what we need first in an explicit enumeration of the semantics
you're looking for.

	-hpa


      reply	other threads:[~2011-12-19 23:30 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 19:22 copy offload support in Linux - new system call needed? Ric Wheeler
2011-12-14 19:27 ` Al Viro
2011-12-14 19:42   ` Ric Wheeler
2011-12-14 22:27     ` J. Bruce Fields
2011-12-15 14:59       ` Trond Myklebust
2011-12-15 15:52         ` Chris Mason
2011-12-15 16:00           ` Trond Myklebust
2011-12-15 16:03           ` Jeff Layton
2011-12-15 16:06             ` Trond Myklebust
2011-12-15 16:16               ` Jeff Layton
2011-12-15 16:38                 ` Trond Myklebust
2011-12-15 16:08         ` Loke, Chetan
2011-12-15 16:11           ` Trond Myklebust
2011-12-15 16:40             ` Loke, Chetan
2011-12-15 16:53               ` Trond Myklebust
2011-12-15 17:18                 ` Ric Wheeler
2011-12-15 17:25                   ` Trond Myklebust
2011-12-15 17:31                   ` Loke, Chetan
2011-12-15 17:55                     ` Ric Wheeler
2011-12-15 17:27                 ` Loke, Chetan
2011-12-15 17:44         ` J. Bruce Fields
2011-12-16  8:00     ` Joel Becker
2011-12-14 19:59 ` Jeremy Allison
2011-12-14 20:30   ` Ric Wheeler
2011-12-19 12:38     ` Hannes Reinecke
2011-12-19 22:19   ` H. Peter Anvin
2011-12-19 22:34     ` Jeremy Allison
2011-12-19 22:57     ` Dave Chinner
2011-12-19 23:29       ` H. Peter Anvin [this message]

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=4EEFC8EE.70001@zytor.com \
    --to=hpa@zytor.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@fromorbit.com \
    --cc=hare@suse.de \
    --cc=jlbec@evilplan.org \
    --cc=jra@samba.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ricwheeler@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).