FreeBSD Scheduling on Hybrid CPUs
16 days ago
- #performance-optimization
- #hybrid-cpus
- #scheduling
- Hybrid CPUs combine Performance (P) and Efficiency (E) cores, introduced by Intel (e.g., Alder Lake) and ARM (big.LITTLE).
- Scheduling on hybrid CPUs requires awareness of core performance/energy differences and policies for optimal thread placement.
- Policies include maximizing performance, energy savings, or balancing both, with user/admin control over core selection.
- Cpusets restrict threads to specific cores but don't guide core selection; policies should complement cpusets for flexibility.
- Thread migration policies must address fairness and performance discrepancies between core types, especially for long-running threads.
- Intel's Thread Director provides real-time feedback on thread performance across core types, aiding in scheduling decisions.
- Detection of core types (P, E, LP-E) is possible via CPUID, though LP-E cores on Meteor Lake require special handling.
- Fairness in scheduling must account for differing computing power per core type, possibly requiring runtime adjustments.