From: Chuck Lever III <chuck.lever@oracle.com>
To: Wang Yugui <wangyugui@e16-tech.com>
Cc: Chuck Lever <cel@kernel.org>, Jeff Layton <jlayton@redhat.com>,
Neil Brown <neilb@suse.de>,
Linux NFS Mailing List <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH RFC] NFSD: Convert filecache to rhltable
Date: Fri, 6 Jan 2023 14:13:24 +0000 [thread overview]
Message-ID: <1CAF2C85-59C3-4491-BF88-32130ED77CB2@oracle.com> (raw)
In-Reply-To: <20230106140033.EE9D.409509F4@e16-tech.com>
> On Jan 6, 2023, at 1:00 AM, Wang Yugui <wangyugui@e16-tech.com> wrote:
>
> Hi,
>
>> From: Chuck Lever <chuck.lever@oracle.com>
>>
>> While we were converting the nfs4_file hashtable to use the kernel's
>> resizable hashtable data structure, Neil Brown observed that the
>> list variant (rhltable) would be better for managing nfsd_file items
>> as well. The nfsd_file hash table will contain multiple entries for
>> the same inode -- these should be kept together on a list. And, it
>> could be possible for exotic or malicious client behavior to cause
>> the hash table to resize itself on every insertion.
>>
>> A nice simplification is that rhltable_lookup() can return a list
>> that contains only nfsd_file items that match a given inode, which
>> enables us to eliminate specialized hash table helper functions and
>> use the default functions provided by the rhashtable implementation).
>>
>> Since we are now storing nfsd_file items for the same inode on a
>> single list, that effectively reduces the number of hash entries
>> that have to be tracked in the hash table. The mininum bucket count
>> is therefore lowered.
>
> some bench result such as fstests generic/531 maybe useful.
Sure. I don't expect there will be much change, but one never knows.
> And this patch conflict with another patch:
> (v3) [PATCH] nfsd: fix handling of cached open files in nfsd4_open codepath
Yes, this is known to conflict with patches that are now in flight.
I'll rebase once those are merged.
--
Chuck Lever
next prev parent reply other threads:[~2023-01-06 14:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 14:58 [PATCH RFC] NFSD: Convert filecache to rhltable Chuck Lever
2023-01-06 6:00 ` Wang Yugui
2023-01-06 14:13 ` Chuck Lever III [this message]
2023-01-06 15:56 ` Jeff Layton
2023-01-23 20:15 ` Jeff Layton
2023-01-23 20:34 ` Chuck Lever III
2023-01-23 21:38 ` Jeff Layton
2023-01-24 14:57 ` Fwd: " Chuck Lever III
2023-01-30 6:09 ` Herbert Xu
2023-01-30 15:21 ` Chuck Lever III
2023-01-30 18:10 ` 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=1CAF2C85-59C3-4491-BF88-32130ED77CB2@oracle.com \
--to=chuck.lever@oracle.com \
--cc=cel@kernel.org \
--cc=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=wangyugui@e16-tech.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