mds: some optimizations around client Capability and Lease tracking#57911
Merged
mds: some optimizations around client Capability and Lease tracking#57911
Conversation
added 2 commits
June 10, 2024 13:21
Signed-off-by: "Yan, Zheng" <yanzheng03@kuaishou.com>
Signed-off-by: "Yan, Zheng" <yanzheng03@kuaishou.com>
22ccc65 to
2b258f9
Compare
Signed-off-by: "Yan, Zheng" <yanzheng03@kuaishou.com>
This allows to avoid additional redundant lookups in CDentry::client_leases for some scenarios, e.g.: * CDentry::remove_client_lease() is called from CDentry::remove_client_leases(). * CDentry::remove_client_lease() is called from Locker::remove_stale_leases() * CDentry::remove_client_lease() is called from Locker::process_request_cap_release() And a few similar cases. In all of them a caller has a pointer to ClientLease object but has to perform another lookup to remove that lease. Signed-off-by: Garry Drankovich <garry.drankovich@clyso.com>
2b258f9 to
2140fbf
Compare
vshankar
reviewed
Jul 1, 2024
|
|
||
| elist<CInode*> inodes_with_caps; // for efficient realm splits | ||
| std::map<client_t, xlist<Capability*>* > client_caps; // to identify clients who need snap notifications | ||
| std::map<client_t, elist<Capability*> > client_caps; // to identify clients who need snap notifications |
Contributor
There was a problem hiding this comment.
This is a nice saving. Just for information sake, here is the size difference:
16 elist<>::item
32 xlist<>::item
This is from a sample MDS log (main branch build) that dumps struct sizes on start. 👍
Contributor
|
This PR is under test in https://tracker.ceph.com/issues/66850. |
Contributor
|
This PR is under test in https://tracker.ceph.com/issues/67089. |
Contributor
|
I'm seeing some new failures in the branch which this PR is a part of. Trying to isolate the problematic change. Will update when done. |
Contributor
Author
|
jenkins test api |
vshankar
approved these changes
Aug 8, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a partial revival of @ukernel's optimization PR: #43126
which has
The last commit from myself switches ClientLease tracking from std::map to boost::intrusive::set to reduce amount of lookups over client_leases collection .
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e