Skip to content

squid: msg: insert PriorityDispatchers in sorted position - #58991

Merged
SrinivasaBharath merged 1 commit into
ceph:squidfrom
cbodley:wip-67307-squid
Oct 16, 2024
Merged

SrinivasaBharath merged 1 commit into
ceph:squidfrom
cbodley:wip-67307-squid

Conversation

@cbodley

@cbodley cbodley commented Aug 1, 2024

Copy link
Copy Markdown
Contributor

avoid calling stable_sort() after every insertion by inserting directly
into the sorted position. use lower_bound() to insert at the head and
upper_bound() to insert at the tail

this generally only happens during startup so isn't a performance
problem, but std::stable_sort() was triggering strange valgrind warnings
for "Mismatched free() / delete / delete []" when it allocates a
temporary buffer

Fixes: https://tracker.ceph.com/issues/66336

Signed-off-by: Casey Bodley <[email protected]>
(cherry picked from commit 063d100)
@cbodley
cbodley requested a review from a team as a code owner August 1, 2024 13:52
@cbodley cbodley added this to the squid milestone Aug 1, 2024
@cbodley
cbodley requested review from a team August 1, 2024 13:54
@rishabh-d-dave

Copy link
Copy Markdown
Contributor

@SrinivasaBharath
SrinivasaBharath merged commit b55fc51 into ceph:squid Oct 16, 2024
afreen23 pushed a commit to rhcs-dashboard/ceph that referenced this pull request Jul 29, 2026
squid: msg: insert PriorityDispatchers in sorted position
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants