On 2/19/2024 3:48 AM, Muhammad Usama Anjum wrote: > On Fri, 2024-01-26 at 15:59 -0600, David Vernet wrote: >> Hello, >> >> A few more use cases have emerged for sched_ext that are not yet >> supported that I wanted to discuss in the BPF track. Specifically: >> >> - EAS: Energy Aware Scheduling >> >> While firmware ultimately controls the frequency of a core, the kernel >> does provide frequency scaling knobs such as EPP. It could be useful for >> BPF schedulers to have control over these knobs to e.g. hint that >> certain cores should keep a lower frequency and operate as E cores. >> This could have applications in battery-aware devices, or in other >> contexts where applications have e.g. latency-sensitive >> compute-intensive workloads. > The current scheduler must already be using the frequency scaling > knobs. Can sched_ext use those knobs directly with hint from userspace > easily? With regards to the current way of doing things, it depends. On Intel platforms, if HWP is enabled (Hardware-Controlled Performance States) which it is on almost all Intel platforms I've seen, then the selection of the individual Performance states (P-states) is done by the hardware, not the OS. My understanding is the benefit of HWP is responsiveness of the state selection. So the only thing OS can control then is either Turbo boost, or EPP. Unfortunately, this hinders using an energy model and doing energy calculations (ex. If I place shit on this core instead of that, then the total system power is such and such because P-state on this core is this) the way EAS on ARM does. But maybe we can do something simple with what is available and reap some benefits. On ARM platforms, there is more finer grained OS control of different operating performance points (what they call OPP). Thanks.