linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Trond Myklebust <trond.myklebust@primarydata.com>
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH 0/7] Add RCU-walk support to NFS.
Date: Mon, 14 Jul 2014 11:28:20 +1000	[thread overview]
Message-ID: <20140714011630.12562.1940.stgit@notabene.brown> (raw)

NFS current abort and attempt at filename lookup in RCU mode.
This can have serious performance impact on a highly parallel load.

The "Makefile" below generates just such a load.  On a 40-core
machine "make -j 40" is about 6 times as fast at "make -j 5"
when a local filesystem is used (e.g. XFS), but as much as half
as fast when NFS is used.
With this patch set, "make -j 40" is about 3 times as fast as
"make -j 5" on NFS, and "perf" data doesn't show spinlocks to be a big
problem any more.

This is a re-submission with a few small improvements of a patch set
posted in March.  Since then I have recieved confirmation that it
definitely fixes the problem, when combined with a patch set which
enhances autofs4 in a similar way.  So it has had quite a bit of
testing.

NeilBrown

The makefile.  Run
  make -f this-makefile NFS_PATH=/some/nfs/mounted/empty/directory

and an 'objs' directory will be created with lots of objects.
Use "make clean" before trying again.

---
# Options available from the command line
NUM_NFS_INCLUDES := 50
NUM_COMPILES := 200
NFS_PATH:=/import/dummySrc
# When adding includes, they will be of the form $(NFS_PATH)/x where
# x ranges from 1 to NUM_NFS_INCLUDES.  Those directories are created
# automatically by the 'dirs' target.

SHELL:=bash
OBJ_DIR:=objs
ifeq ($(VERBOSE),1)
  Q =
else
  Q = @
endif

MY_INCLUDES := $(addprefix -I$(NFS_PATH)/, $(shell echo {1..$(NUM_NFS_INCLUDES)}))
INCLUDE_DIRS := $(addprefix $(NFS_PATH)/, $(shell echo {1..$(NUM_NFS_INCLUDES)}))
MY_OBJS     := $(addsuffix _test.o, $(addprefix $(OBJ_DIR)/, $(shell echo {1..$(NUM_COMPILES)})))

build: dirs $(MY_OBJS)

dirs:
	$(Q)mkdir -p $(INCLUDE_DIRS)

clean:
	$(Q)rm -rf $(OBJ_DIR)

$(OBJ_DIR)/:
	$(Q)/bin/mkdir $(OBJ_DIR)

$(MY_OBJS): test.cpp | $(OBJ_DIR)/
	$(Q)gcc $(MY_INCLUDES) -c test.cpp -o $@

test.cpp:
	$(Q)echo "#include <iostream>" > test.cpp

.PHONY: all build clean


---

NeilBrown (7):
      NFS: nfs4_lookup_revalidate: only evaluate parent if it will be used.
      NFS: prepare for RCU-walk support but pushing tests later in code.
      sunrpc/auth: allow lockless (rcu) lookup of credential cache.
      NFS: support RCU_WALK in nfs_permission()
      NFS: teach nfs_neg_need_reval to understand LOOKUP_RCU
      NFS: teach nfs_lookup_verify_inode to handle LOOKUP_RCU
      NFS: allow lockless access to access_cache


 fs/nfs/dir.c                |  166 ++++++++++++++++++++++++++++++++++---------
 fs/nfs/inode.c              |    9 ++
 include/linux/nfs_fs.h      |    2 +
 include/linux/sunrpc/auth.h |    2 +
 net/sunrpc/auth.c           |   17 ++++
 net/sunrpc/auth_generic.c   |    6 ++
 net/sunrpc/auth_null.c      |    2 +
 7 files changed, 168 insertions(+), 36 deletions(-)

-- 
Signature


             reply	other threads:[~2014-07-14  1:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-14  1:28 NeilBrown [this message]
2014-07-14  1:28 ` [PATCH 4/7] NFS: support RCU_WALK in nfs_permission() NeilBrown
2014-07-14  1:28 ` [PATCH 7/7] NFS: allow lockless access to access_cache NeilBrown
2014-07-14  1:28 ` [PATCH 1/7] NFS: nfs4_lookup_revalidate: only evaluate parent if it will be used NeilBrown
2014-07-15 16:56   ` Christoph Hellwig
2014-07-14  1:28 ` [PATCH 2/7] NFS: prepare for RCU-walk support but pushing tests later in code NeilBrown
2014-07-14  1:28 ` [PATCH 6/7] NFS: teach nfs_lookup_verify_inode to handle LOOKUP_RCU NeilBrown
2014-07-14  1:28 ` [PATCH 5/7] NFS: teach nfs_neg_need_reval to understand LOOKUP_RCU NeilBrown
2014-07-14  1:28 ` [PATCH 3/7] sunrpc/auth: allow lockless (rcu) lookup of credential cache NeilBrown
2014-07-14  2:00 ` [PATCH 0/7] Add RCU-walk support to NFS Trond Myklebust
2014-07-14  2:25   ` NeilBrown
2014-07-14  2:39     ` Trond Myklebust
2014-07-23  7:14       ` NeilBrown

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=20140714011630.12562.1940.stgit@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.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).