All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Jeff Layton <jeff.layton@primarydata.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	bfields@fieldses.org, linux-nfs@vger.kernel.org,
	trond.myklebust@primarydata.com
Subject: Re: [PATCH v2 2/2] nfsd: avoid taking the state_lock while holding the i_lock
Date: Sat, 7 Jun 2014 07:31:33 -0700	[thread overview]
Message-ID: <20140607143133.GA5072@infradead.org> (raw)
In-Reply-To: <20140607102826.59a4af24@tlielax.poochiereds.net>

On Sat, Jun 07, 2014 at 10:28:26AM -0400, Jeff Layton wrote:
> Well, I think using the fp->fi_lock instead of the i_lock here is
> reasonable. We at least avoid taking the state_lock (which is likely to
> be much more contended) within the i_lock.

Yes, avoiding i_lock usage inside nfsd is something I'd prefer.  But
with the current lock manager ops that are called with i_lock held
we'll have some leakage into the nfsd lock hierachy anyway
unfortunately.

> The thing that makes this
> patch nasty is all of the shenanigans to queue the delegation to the
> global list from within rpc_prepare or rpc_release.
> 
> Personally, I think it'd be cleaner to add some sort of cb_prepare
> operation to the generic callback framework you're building to handle
> that, but let me know what you thing.

I guess I'll have to do it that way then.  It's not like so far
unreleased code should be a hard blocker for a bug fix anyway.

Care to prefer a version that uses fi_lock, but otherwise works like the
first version?


  reply	other threads:[~2014-06-07 14:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-06 13:07 [PATCH v2 0/2] nfsd: preliminary patches for client_mutex removal Jeff Layton
2014-06-06 13:07 ` [PATCH v2 1/2] nfsd: Protect addition to the file_hashtbl Jeff Layton
2014-06-06 14:14   ` Christoph Hellwig
2014-06-06 13:07 ` [PATCH v2 2/2] nfsd: avoid taking the state_lock while holding the i_lock Jeff Layton
2014-06-07 14:09   ` Christoph Hellwig
2014-06-07 14:28     ` Jeff Layton
2014-06-07 14:31       ` Christoph Hellwig [this message]
2014-06-07 14:34         ` Jeff Layton

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=20140607143133.GA5072@infradead.org \
    --to=hch@infradead.org \
    --cc=bfields@fieldses.org \
    --cc=jeff.layton@primarydata.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 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.