From: bfields@fieldses.org (J. Bruce Fields)
To: Chuck Lever <chuck.lever@oracle.com>
Cc: Jeff Layton <jlayton@redhat.com>,
"J. Bruce Fields" <bfields@redhat.com>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: nfsd: delegation conflicts between NFSv3 and NFSv4 accessors
Date: Tue, 14 Mar 2017 09:55:13 -0400 [thread overview]
Message-ID: <20170314135513.GA31956@fieldses.org> (raw)
In-Reply-To: <0D674F66-1A35-4FA9-8827-111B3E9D969C@oracle.com>
On Mon, Mar 13, 2017 at 01:12:32PM -0400, Chuck Lever wrote:
> > On Mar 13, 2017, at 12:33 PM, Jeff Layton <jlayton@redhat.com> wrote:
> > Yes. I'm just not sold that what you're proposing would be any better
> > than what we have for the vast majority of people. It might be, but I
> > don't think that's necessarily the case.
>
> In other words, both of you are comparing my use case with
> a counterfactual. That doesn't seem like a fair fight.
There's always a bias towards existing behavior.
> Can you demonstrate a specific use case where not offering
> a delegation during mixed NFSv3 and NFSv4 access is a true
> detriment? (I am open to hearing about it).
I'd look for a read-mostly workload with frequent opens and
closes--maybe libraries or config files that every executable opens at
startup?
> What happens when an NFSv3 client sends an NLM LOCK on a
> delegated file? I assume the correct response is for the
> server to return NLM_LCK_BLOCKED, recall the delegation, and
> then call the client back when the delegation has been
> returned. Is that known to work?
I don't currently have a test for that, and from looking at the code I'm
not confident it's correct.
Looks like the call chain is:
nlmsvc_proc_lock->
nlmsvc_retrieve_args->
nlm_lookup_file->
fopen = nlm_open->
nfsd_open->nfsd_open_break_lease
And I'd expect that to return EWOULDBLOCK. But nfsd_open is getting
called just with MAY_LOCK, and I think it needs MAY_READ or _WRITE to
recognize conflicts correctly.
And then if it did hit a conflict it would return EWOULDBLOCK, but it
looks like that ends up as nlm_lck_denied_nolocks, which is totally
unhelpful.
It's possible I'm missing something. Obviously it needs testing.
> There are other cases where context switching an nfsd would be
> useful. For example, inserting an opportunity for nfsd_write
> to perform transport reads (after having allocated pages in
> the right file) could provide some benefits by reducing data
> copies and page allocator calls.
For now I think we can just live with threads blocking briefly--as you
say, we already do for disk. Though if a slow client could cause that
rdma read to block too long then we'd need a maximum timeout.
--b.
prev parent reply other threads:[~2017-03-14 13:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-11 16:53 nfsd: delegation conflicts between NFSv3 and NFSv4 accessors Chuck Lever
2017-03-11 17:08 ` Jeff Layton
2017-03-11 20:46 ` Chuck Lever
2017-03-11 21:04 ` Jeff Layton
2017-03-13 13:27 ` J. Bruce Fields
2017-03-13 15:30 ` Chuck Lever
2017-03-13 16:01 ` J. Bruce Fields
2017-03-13 16:06 ` J. Bruce Fields
2017-03-13 16:33 ` Jeff Layton
2017-03-13 17:12 ` Chuck Lever
2017-03-13 18:26 ` Chuck Lever
2017-03-14 14:05 ` Jeff Layton
2017-03-14 13:55 ` J. Bruce Fields [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=20170314135513.GA31956@fieldses.org \
--to=bfields@fieldses.org \
--cc=bfields@redhat.com \
--cc=chuck.lever@oracle.com \
--cc=jlayton@redhat.com \
--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;
as well as URLs for NNTP newsgroup(s).