The Energy Aware Scheduler (EAS) is now available as part of Linux 5.0. It enables energy-efficient scheduling decisions on big.LITTLE and DynamIQ Arm platforms by choosing the right type of CPU for each task.
EAS is an extension of the Linux task scheduler improving battery life of mobile devices. It uses a model of CPU energy consumption (called the Energy Model, or EM) to optimize the placement of tasks on the most energy-efficient CPUs of big.LITTLE and/or DynamIQ platforms while meeting compute requirements. The EM provides an abstract view of the CPU topology to the scheduler, and informs it about the power cost associated with running each CPU at the available frequencies. Using the EM, EAS is then able to predict what will be the impact on energy of executing a task on one particular CPU or another, and to make decisions which minimize energy consumption.
A key design point of EAS lies in its tight binding to the DVFS subsystem, CPUFreq, which is responsible for driving the frequencies of CPUs. The schedutil CPUFreq governor uses the scheduler’s load-tracking metrics to decide upon frequency changes of CPUs. The same metrics are also used by the EAS algorithms to coordinate frequency requests and task placement decisions. This level of coordination coupled with the EM allows EAS to estimate how a task migration can impact the system’s energy consumption, and take that into account during the decision-making process. In essence, EAS enables the Linux task scheduler to leverage the energy-efficiency of little CPUs to improve battery life of mobile devices without harming the performance.
The figure below shows test results using EAS on an Arm Juno r0 platform using RT-App (a synthetic workload generator) in a low intensity scenario where energy consumption is the primary concern, and Hackbench as a performance benchmark. More details about the test setup and the metrics can be found in the original EAS cover letter on LKML .
Our mainline implementation has been carefully crafted to allow multiple sources for the EM configuration data. From 5.1 onwards, mainline Linux will fully support loading an EM by:
Products based upon Arm big.LITTLE technology launched in 2013. In the first iterations, simple CPU switching technology was used to execute tasks on either a high-performance ‘big’ core or on a power-saving ‘little’ core. Later, Global Task Scheduling allowed all cores to be visible to the scheduler which proved that this is beneficial. Since android-3.18, EAS support has been available for the Android Common Kernel which makes the Linux scheduler aware of the power/performance differences between the cores. Alongside this, Arm and Linaro have worked closely on incrementally improving the mainline Linux scheduler to be fully aware of the differences between CPUs. This has culminated in the addition of the EM which completes the pieces to enable EAS in mainline kernels.
With EAS upstream, the entire range of Linux-derived products are able to achieve energy savings - including ChromeOS and all Linux distributions for example. For the existing users of EAS in Android, being able to use a mainline feature in lieu of Android-specific code relieves them from a significant maintenance burden caused by out-of-tree code. Moreover, having EAS in mainline will improve test coverage by enabling more developers to use it, which will help raise the code quality even further.
The EAS Arm developer web page tracks the latest EAS-related development activities. In addition, the mainline documentation of EAS’ building blocks (anticipated in Linux 5.1+) can be found in the kernel source tree under: