linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Benjamin Coddington <bcodding@redhat.com>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>,
	Anna Schumaker <anna.schumaker@netapp.com>,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH] NFS: Serialize nfs_readdir()
Date: Wed, 7 Dec 2016 08:30:26 -0800	[thread overview]
Message-ID: <20161207163026.GA9166@infradead.org> (raw)
In-Reply-To: <a87df5d5ada87834a1cb9f1ab12ed5113d80eda7.1481117708.git.bcodding@redhat.com>

On Wed, Dec 07, 2016 at 08:37:02AM -0500, Benjamin Coddington wrote:
> Optimizations to NFS to choose between READDIR and READDIRPLUS don't expect
> concurrent users of nfs_readdir(), and can cause the pagecache to
> repeatedly be invalidated unnecessarily for this case.  Fix this by
> serializing nfs_readdir() on the directory's rwsem.

Just implement .iterate instead of .iterate_shared and you'll get the
serialization for free.  While doing that please add a comment on why
it's serialized.

  reply	other threads:[~2016-12-07 16:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-07 13:28 Concurrent `ls` takes out the thrash Benjamin Coddington
2016-12-07 13:37 ` [PATCH] NFS: Serialize nfs_readdir() Benjamin Coddington
2016-12-07 16:30   ` Christoph Hellwig [this message]
2016-12-07 19:40     ` Benjamin Coddington
2016-12-07 17:01   ` kbuild test robot
2016-12-07 15:46 ` Concurrent `ls` takes out the thrash Trond Myklebust
2016-12-07 19:46   ` Benjamin Coddington
2016-12-07 22:34     ` Benjamin Coddington
2016-12-07 22:41       ` Trond Myklebust
2016-12-07 22:55         ` Benjamin Coddington
2016-12-07 22:59           ` Trond Myklebust
2016-12-07 23:10             ` Benjamin Coddington
2016-12-08 14:18               ` Benjamin Coddington
2016-12-08 16:13                 ` Benjamin Coddington
2016-12-08 21:48                   ` Benjamin Coddington

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=20161207163026.GA9166@infradead.org \
    --to=hch@infradead.org \
    --cc=anna.schumaker@netapp.com \
    --cc=bcodding@redhat.com \
    --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).