Linux NFS development
 help / color / mirror / Atom feed
From: Anna Schumaker <Anna.Schumaker@netapp.com>
To: <linux-nfs@vger.kernel.org>, <Trond.Myklebust@primarydata.com>,
	<bfields@fieldses.org>, <hch@infradead.org>
Subject: [PATCH v1 0/4] NFSv4.2: Add support for the COPY operation
Date: Thu, 3 Dec 2015 15:55:33 -0500	[thread overview]
Message-ID: <1449176137-4940-1-git-send-email-Anna.Schumaker@Netapp.com> (raw)

These patches add client and server support for the NFS v4.2 COPY operation,
and depend on the new copy_file_range() system call currently scheduled for
Linux 4.5. I gathered performance information by comparing the runtime and RPC
count of my test program, included as an RFC patch, against /usr/bin/cp for
various file sizes.

/usr/bin/cp:
                      size:    513MB   1024MB   1536MB   2048MB
------------- ------------- -------- -------- -------- --------
nfs v4 client        total:     8203    16396    24588    32780
------------- ------------- -------- -------- -------- --------
nfs v4 client         read:     4096     8192    12288    16384
nfs v4 client        write:     4096     8192    12288    16384
nfs v4 client       commit:        1        1        1        1
nfs v4 client         open:        1        1        1        1
nfs v4 client    open_noat:        2        2        2        2
nfs v4 client        close:        1        1        1        1
nfs v4 client      setattr:        2        2        2        2
nfs v4 client       access:        2        3        3        3
nfs v4 client      getattr:        2        2        2        2

/usr/bin/cp /nfs/test-512  /nfs/test-copy  0.00s user 0.32s system 14% cpu 2.209 total
/usr/bin/cp /nfs/test-1024 /nfs/test-copy  0.00s user 0.66s system 18% cpu 3.651 total
/usr/bin/cp /nfs/test-1536 /nfs/test-copy  0.02s user 0.97s system 18% cpu 5.477 total
/usr/bin/cp /nfs/test-2048 /nfs/test-copy  0.00s user 1.38s system 15% cpu 9.085 total


Copy system call:
                      size:    512MB   1024MB   1536MB   2048MB
------------- ------------- -------- -------- -------- --------
nfs v4 client        total:        6        6        6        6
------------- ------------- -------- -------- -------- --------
nfs v4 client         open:        2        2        2        2
nfs v4 client        close:        2        2        2        2
nfs v4 client       access:        1        1        1        1
nfs v4 client         copy:        1        1        1        1


./nfscopy /nfs/test-512  /nfs/test-copy  0.00s user 0.00s system 0% cpu 1.148 total
./nfscopy /nfs/test-1024 /nfs/test-copy  0.00s user 0.00s system 0% cpu 2.293 total
./nfscopy /nfs/test-1536 /nfs/test-copy  0.00s user 0.00s system 0% cpu 3.037 total
./nfscopy /nfs/test-2048 /nfs/test-copy  0.00s user 0.00s system 0% cpu 4.045 total


Questions, comments, and other testing ideas would be greatly appreciated!

Thanks,
Anna


Anna Schumaker (4):
  NFSD: Pass filehandle to nfs4_preprocess_stateid_op()
  NFSD: Implement the COPY call
  NFS: Add COPY nfs operation
  vfs_copy_range() test program

 fs/nfs/nfs42.h            |   1 +
 fs/nfs/nfs42proc.c        |  58 ++++++++++++++++++++
 fs/nfs/nfs42xdr.c         | 136 ++++++++++++++++++++++++++++++++++++++++++++++
 fs/nfs/nfs4file.c         |   8 +++
 fs/nfs/nfs4proc.c         |   1 +
 fs/nfs/nfs4xdr.c          |   1 +
 fs/nfs/objlayout/Makefile |   0
 fs/nfsd/nfs4proc.c        |  91 ++++++++++++++++++++++++++++---
 fs/nfsd/nfs4state.c       |   5 +-
 fs/nfsd/nfs4xdr.c         |  62 ++++++++++++++++++++-
 fs/nfsd/state.h           |   4 +-
 fs/nfsd/vfs.c             |  17 ++++++
 fs/nfsd/vfs.h             |   1 +
 fs/nfsd/xdr4.h            |  23 ++++++++
 include/linux/nfs4.h      |   1 +
 include/linux/nfs_fs_sb.h |   1 +
 include/linux/nfs_xdr.h   |  27 +++++++++
 nfscopy.c                 |  59 ++++++++++++++++++++
 18 files changed, 482 insertions(+), 14 deletions(-)
 create mode 100644 fs/nfs/objlayout/Makefile
 create mode 100644 nfscopy.c

-- 
2.6.3


             reply	other threads:[~2015-12-03 20:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03 20:55 Anna Schumaker [this message]
2015-12-03 20:55 ` [PATCH v1 1/3] NFSD: Pass filehandle to nfs4_preprocess_stateid_op() Anna Schumaker
2015-12-03 20:55 ` [PATCH v1 2/3] NFSD: Implement the COPY call Anna Schumaker
2015-12-04 15:45   ` J. Bruce Fields
2015-12-04 15:49     ` Anna Schumaker
2015-12-04 16:49       ` J. Bruce Fields
2015-12-04 17:05         ` Anna Schumaker
2015-12-04 17:14           ` J. Bruce Fields
2015-12-07 19:26   ` Christoph Hellwig
2015-12-07 21:03     ` Anna Schumaker
2015-12-03 20:55 ` [PATCH v1 3/3] NFS: Add COPY nfs operation Anna Schumaker
2015-12-07 19:28   ` Christoph Hellwig
2015-12-03 20:55 ` [RFC v1 4/3] vfs_copy_range() test program Anna Schumaker
2015-12-07 19:23 ` [PATCH v1 0/4] NFSv4.2: Add support for the COPY operation Christoph Hellwig

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=1449176137-4940-1-git-send-email-Anna.Schumaker@Netapp.com \
    --to=anna.schumaker@netapp.com \
    --cc=Trond.Myklebust@primarydata.com \
    --cc=bfields@fieldses.org \
    --cc=hch@infradead.org \
    --cc=linux-nfs@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox