Commit 063d100
committed
msg: insert PriorityDispatchers in sorted position
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]>1 parent f19d3f8 commit 063d100
1 file changed
+17
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
109 | 120 | | |
110 | 121 | | |
111 | 122 | | |
| |||
401 | 412 | | |
402 | 413 | | |
403 | 414 | | |
404 | | - | |
405 | | - | |
| 415 | + | |
| 416 | + | |
406 | 417 | | |
407 | | - | |
408 | | - | |
| 418 | + | |
409 | 419 | | |
410 | 420 | | |
411 | 421 | | |
| |||
419 | 429 | | |
420 | 430 | | |
421 | 431 | | |
422 | | - | |
423 | | - | |
| 432 | + | |
| 433 | + | |
424 | 434 | | |
425 | | - | |
426 | | - | |
| 435 | + | |
427 | 436 | | |
428 | 437 | | |
429 | 438 | | |
| |||
0 commit comments