quincy: mds: use regular dispatch for processing beacons#57684
Closed
batrick wants to merge 4 commits intoceph:quincyfrom
Closed
quincy: mds: use regular dispatch for processing beacons#57684batrick wants to merge 4 commits intoceph:quincyfrom
batrick wants to merge 4 commits intoceph:quincyfrom
Conversation
Member
|
This PR is under test in https://tracker.ceph.com/issues/67315. |
76ec889 to
0c6733f
Compare
Member
Author
|
jenkins test make check |
Contributor
|
This PR is under test in https://tracker.ceph.com/issues/69400. |
For order checking. Signed-off-by: Patrick Donnelly <pdonnell@redhat.com> (cherry picked from commit 1b93fd5)
So we can ensure that e.g. MDSRank::ms_dispatch is lowest priority so that we do not acquire the mds_lock when looking at beacons. This change maintains the current behavior when the priority is unset: the use of std::stable_sort will ensure that the add_dispatcher_head and add_dispatcher_tail calls will preserve order when dispatcher priorities are equal. Fixes: 7fc04be Signed-off-by: Patrick Donnelly <pdonnell@redhat.com> (cherry picked from commit b463d93)
Similar to the issue with MClientMetrics, beacons should also not be handled via fast dispatch because it's necessary to acquire Beacon::mutex. This is a big no-no as it may block one of the Messenger threads leading to improbable deadlocks or DoS. Instead, use the normal dispatch where acquiring locks is okay to do. Fixes: 7fc04be See-also: linux.git/f7c2f4f6ce16fb58f7d024f3e1b40023c4b43ff9 Fixes: https://tracker.ceph.com/issues/65658 Signed-off-by: Patrick Donnelly <pdonnell@redhat.com> (cherry picked from commit 7fc2a65)
This tries to preserve existing order but uses priorities to make it explicit and robust to future dispatchers being added. Except: - The beacon and metrics dispatcher have the highest priorities. This is to ensure we process these messages before trying to acquire any expensive locks (like mds_lock). - The monc dispatcher also has a relatively high priority for the same reasons. This change affects other daemons which may have ordered a dispatcher ahead of the monc but I cannot think of a legitimate reason to nor do I see an instance of it. Fixes: 7fc04be Signed-off-by: Patrick Donnelly <pdonnell@redhat.com> (cherry picked from commit 3291f39)
0c6733f to
88c409f
Compare
Contributor
|
Quincy is EOL. |
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.
backport tracker: https://tracker.ceph.com/issues/66195
backport of #57469
parent tracker: https://tracker.ceph.com/issues/66014
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh