Expand description
Helper to boost critical threads
On heterogeneous (e.g. big.LITTLE) CPUs the scheduler might not be able to determine which threads are critical. This module serves as an entry point to define policies for thread-affinity, thread priority and core frequency boosting or other mechanisms a platform might have for apps to allow the OS to optimize thread performance.
TODO(#46813): We provide a default implementation here, but the embedder should be able to customize this (e.g. if they care more about energy efficiency then raw performance, for example in battery saving mode). TODO: For android we should look at the performance hint API in the NDK. TODO: For mobile linux, the ohos implementation could be shared, however other APIs like uclamp or enhanced thread priorities might work better there?
Modules§
- platform 🔒
Enums§
- Boost
Affinity - On heterougenous systems (e.g. big.LITTLE architecture), select whether we should attempt to boost this thread to a larger core. The exact effect is platform specific, a hint and may be ignored.
- Thread
Priority
Functions§
- boost_
thread - Hint to the scheduler that this thread should be prioritised.