Commit 3549908
committed
[vqueues] Fix a bug with a lost wakeup on inbox event
The vqueues DRR scheduler wasn't waking up the waker whenever an inbox event happens (e.g. an entry is enqueued). It seems like it was there before, and got removed as part of [this commit](4f22aa677816#diff-02cc9fd99c15c55730f0822a024e9d2c6bd7f4f92d3cc2d8c9d030773f1d6f6d). This is currently not causing any issues because we're constructing a fresh scheduler stream on every `LeaderState::run`, so wakers are not that useful there. However, with the scheduler of the next PR, it relies on the wakers to figure out which streams to poll, and this bug clearly manifests there.
For simplicity, I'm callin the waker with every `on_inbox_event` call, though admittedly, some events won't result into different scheduler decisions. The original commit had a more invovled `should_wake` propagation, happy to copy it if deemed necessary.
Note: This is a bug that codex found as part of my testing1 parent 7a0b67f commit 3549908
1 file changed
Lines changed: 38 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
357 | 360 | | |
358 | 361 | | |
359 | 362 | | |
| |||
423 | 426 | | |
424 | 427 | | |
425 | 428 | | |
426 | | - | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
427 | 432 | | |
428 | 433 | | |
429 | 434 | | |
| |||
459 | 464 | | |
460 | 465 | | |
461 | 466 | | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
462 | 475 | | |
463 | 476 | | |
464 | 477 | | |
| |||
716 | 729 | | |
717 | 730 | | |
718 | 731 | | |
719 | | - | |
720 | | - | |
| 732 | + | |
| 733 | + | |
721 | 734 | | |
722 | | - | |
| 735 | + | |
723 | 736 | | |
724 | 737 | | |
725 | 738 | | |
726 | 739 | | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
727 | 743 | | |
728 | | - | |
| 744 | + | |
729 | 745 | | |
730 | 746 | | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
731 | 764 | | |
732 | 765 | | |
733 | 766 | | |
| |||
0 commit comments