From: Wang Yugui <wangyugui@e16-tech.com>
To: Chuck Lever III <chuck.lever@oracle.com>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [RPC] nfsd: NFSv4 close a file completely
Date: Wed, 15 Jun 2022 23:28:11 +0800 [thread overview]
Message-ID: <20220615232810.95CE.409509F4@e16-tech.com> (raw)
In-Reply-To: <0CBF71FB-7754-4992-BE16-A3CFD404DECC@oracle.com>
Hi,
> > On Jun 12, 2022, at 3:22 AM, Wang Yugui <wangyugui@e16-tech.com> wrote:
> >
> > NFSv4 need to close a file completely (no lingering open) when it does
> > a CLOSE or DELEGRETURN.
> >
> > When multiple NFSv4/OPEN from different clients, we need to check the
> > reference count. The flowing reference-count-check change the behavior
> > of NFSv3 nfsd_rename()/nfsd_unlink() too.
> >
> > Link: https://bugzilla.linux-nfs.org/show_bug.cgi?id=387
> > Signed-off-by: Wang Yugui <wangyugui@e16-tech.com>
> > ---
> > TO-CHECK:
> > 1) NFSv3 nfsd_rename()/nfsd_unlink() feature change is OK?
> > 2) Can we do better performance than nfsd_file_close_inode_sync()?
> > 3) nfsd_file_close_inode_sync()->nfsd_file_close_inode() in nfsd4_delegreturn()
> > => 'Text file busy' about 4s
> > 4) reference-count-check : refcount_read(&nf->nf_ref) <= 1 or ==0?
> > nfsd_file_alloc() refcount_set(&nf->nf_ref, 1);
> >
> > fs/nfsd/filecache.c | 2 +-
> > fs/nfsd/nfs4state.c | 4 ++++
> > 2 files changed, 5 insertions(+), 1 deletion(-)
>
> I suppose I owe you (and Frank) a progress report on #386. I've fixed
> the LRU algorithm and added some observability features to measure
> how the fix impacts the cache's efficiency for NFSv3 workloads.
>
> These new features show that the hit rate and average age of cache
> items goes down after the fix is applied. I'm trying to understand
> if I've done something wrong or if the fix is supposed to do that.
>
> To handle the case of hundreds of thousands of open files more
> efficiently, I'd like to convert the filecache to use rhashtable.
A question about the comming rhashtable.
Now multiple nfsd export share a cache pool.
In the coming rhashtable, a nfsd export could use a private cache pool
to improve scale out?
Best Regards
Wang Yugui (wangyugui@e16-tech.com)
2022/06/15
next prev parent reply other threads:[~2022-06-15 15:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-12 7:22 [RPC] nfsd: NFSv4 close a file completely Wang Yugui
2022-06-12 18:23 ` Chuck Lever III
2022-06-15 15:28 ` Wang Yugui [this message]
2022-06-15 15:39 ` Chuck Lever III
2022-06-15 18:57 ` Chuck Lever III
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=20220615232810.95CE.409509F4@e16-tech.com \
--to=wangyugui@e16-tech.com \
--cc=chuck.lever@oracle.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