[kernel][sched] Tweak fair priority curve and preemption / latency.
- Switch to an exponential priority-to-weight curve to yield a ~65% bandwidth increase to priority 24 (high priority) over priority 16 (default priority), and a constant ~10% difference between adjacent priorities. - Tweak the bandwidth adjustment to use the start of the current time slice when changing the task rate so that preemptions happen faster when high priority work is available. - Adjust the target latency to provide a time slice more similar to the previous scheduler when a high priority thread competes with lower priority threads. - Minor refactor to remove weight-to-priority conversions, which would require a fixed-point logarithm to compute the inverse of the exponential term. - Optimize the priority-to-weight conversion using a constant table. Bug: MTWN-269 Bug: ZX-3504 Test: Detailed tracing of synthetic workload; observe ratios of bandwidth between priority 16 and priority 24 tasks. Change-Id: I596c45cf3d8c94f93c986508f9ec1007624ac9f3
Showing
- zircon/kernel/include/kernel/fair_scheduler.h 7 additions, 6 deletionszircon/kernel/include/kernel/fair_scheduler.h
- zircon/kernel/include/kernel/fair_task_state.h 10 additions, 5 deletionszircon/kernel/include/kernel/fair_task_state.h
- zircon/kernel/kernel/debug.cpp 1 addition, 1 deletionzircon/kernel/kernel/debug.cpp
- zircon/kernel/kernel/fair_scheduler.cpp 52 additions, 42 deletionszircon/kernel/kernel/fair_scheduler.cpp
Loading
Please register or sign in to comment