Whamcloud - gitweb
LU-8130 nrs: for TBF nid handling using rhashtables 93/54193/7
authorJames Simmons <jsimmons@infradead.org>
Wed, 27 Mar 2024 17:21:37 +0000 (11:21 -0600)
committerOleg Drokin <green@whamcloud.com>
Tue, 23 Apr 2024 19:51:29 +0000 (19:51 +0000)
commite83051f5b1e6a10a11a5296fee47243ef01661dd
treebb3571ade58c914012083940e20ad145ed123a29
parent985f49cf2e634a682d90c1a0548e7bbbbcb6a62d
LU-8130 nrs: for TBF nid handling using rhashtables

While looking at the nrs code for lnet_nid_t I saw TBF was not
using struct lnet_nid. For the first step to support large NIDs
I moved the current use of cfs_hash to rhashtables. This doesn't
complete IPv6 support but its a first step since the rhashtable
can use large NIDs. Next step will be updating tr_nids handling.

With this port I found the refcount handling to be incorrect.
Before this work I saw in the debug logs

Busy TBF object from client with NID 0@lo, with -1073741824 refs

and nrs_tbf_res_put() never cleans up struct nrs_tbf_client until
the filesystem is unmounted. With this patch we do cleanup
each nrs_tbf_client after we are done with policy. With this being
the case nrs_tbf_nid_hop_exit() should be called unless something
is wrong.

Test-Parameters: trivial testlist=sanityn
Change-Id: Iab69a16c12ed89f0694af7bcfe9158f468838ca4
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54193
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_nrs_tbf.h
lustre/ptlrpc/nrs_tbf.c
lustre/tests/sanityn.sh