Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MINOR: mux-quic: use sched call time for pacing
QUIC pacing was recently implemented to limit burst and improve overall bandwidth. This is used only for MUX STREAM emission. Pacing requires nanosecond resolution. As such, it used now_cpu_time() which relies on clock_gettime() syscall. The usage of clock_gettime() as several drawbacks : * it is a syscall and requires a context-switch * it is not be available on all systems * value is changing accross a single task execution which may tamper pacing calculation Improve this by using task_mono_time() instead. This requires the flag TASK_F_WANTS_TIME on QUIC MUX tasklet to require the scheduler to update sched call time with now_mono_time(). This solves any limitations listed above : * syscall invokation is only performed once before tasklet execution, thus reducing context-switch impact * on non compatible system, a millisecond timer is used as a fallback which should ensure that pacing works decently for them * timer value is now guaranteed to be fixed duing task execution
- Loading branch information