msg: insert PriorityDispatchers in sorted position#58631
Conversation
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 <cbodley@redhat.com>
|
jenkins test make check |
|
this resolves the valgrind MismatchedFree issues in the rgw suite: https://pulpito.ceph.com/cbodley-2024-07-17_02:14:05-rgw-wip-66336-distro-default-smithi/ |
I'll run this through fs suite and report. We have been seeing similar valgrind warnings. |
|
This PR is under test in https://tracker.ceph.com/issues/67020. |
|
jenkins test make check |
| bool first = dispatchers.empty(); | ||
| dispatchers.push_back(PriorityDispatcher{priority, d}); | ||
| std::stable_sort(dispatchers.begin(), dispatchers.end()); | ||
| const PriorityDispatcher entry{priority, d}; |
There was a problem hiding this comment.
has the valgrind issue spooked you into using const here to avoid a move? 😆
|
jenkins test make check |
|
jenkins test make check arm64 |
|
(Adding this to a future QA run in case it isn't merged by then. Don't wait for me.) |
|
jenkins test make check arm64 |
|
jenkins test make check arm64 |
|
This PR is under test in https://tracker.ceph.com/issues/67214. |
|
i don't think cephfs had finished testing this yet. hopefully it doesn't break anything there? |
Noticed nothing unusual in my run, so merging this was all good 👍 |
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
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