mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-07-29 03:41:11 +03:00
Minimum packets per stream before next() moves forward
Summary: The idea here is to allow a way to do incremental stream priorities while switching between streams as aggressively. Achieving this is somewhat tricky. The easiest place to track this is to make it so the iterator in QuicPriorityQueue no-op next() until a counter reaches an increment. This is especially impacftul for DSR, where round robining per packet is almost pathologically bad both for CPU impact but also spurious losses and low bandwidth estimates. Thoughts? (Note: this ignores all push blocking failures!) Reviewed By: kvtsoy Differential Revision: D46268308 fbshipit-source-id: cd5b924141365f61f8a3363bc9cb38a62e5c94cf
This commit is contained in:
committed by
Facebook GitHub Bot
parent
35a2d34843
commit
6ecdb35ade
@ -468,7 +468,12 @@ void StreamFrameScheduler::writeStreamsHelper(
|
||||
if (!writeSingleStream(builder, *stream, connWritableBytes)) {
|
||||
break;
|
||||
}
|
||||
level.iterator->next();
|
||||
auto remainingSpaceAfter = builder.remainingSpaceInPkt();
|
||||
// If we wrote a stream frame and there's still space in the packet,
|
||||
// that implies we ran out of data or flow control on the stream and
|
||||
// we should bypass the nextsPerStream in the priority queue.
|
||||
bool forceNext = remainingSpaceAfter > 0;
|
||||
level.iterator->next(forceNext);
|
||||
if (streamPerPacket) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user