Kernel Watch
Jon Masters summarises the latest happenings in the Linux kernel community, for your reading pleasure.
“Perhaps the most interesting features in 5.0 are the energy aware scheduler Patches”
Linus Torvalds announced what is likely to be the final RC (Release Candidate) for the 5.0 kernel cycle. Linux 5.0-rc7 includes relatively few driver and platform fixes, typically for this late in the release process.
As we covered previously, the new major version numbering is more about convenience rather than some earthshattering new set of features. In fact, 5.0 is on the smaller side compared to other recent releases. Perhaps the most interesting features added to 5.0 are the Energy Aware Scheduler (EAS) patches. These will particularly benefit mobile device performance, including Android phones.
EAS patches have been under development for many years. For a while it wasn’t entirely clear that they would be merged into upstream due to the changes that they introduce into some fairly fundamental assumptions made by the kernel. Traditionally, Linux ran on what are known as symmetric or homogeneous systems formed from one or more cores, each of equal capability and collectively sharing certain resources. With the advent of its BIG.LITTLE architecture, ARM disrupted the status quo by introducing heterogeneity into the mainstream. In this new model, a system is formed from a mix of cores having different performance capability. They all can run the same software, but some are more powerefficient than their brawnier peers.
The basic idea is that a device such as a phone spends much of its time doing very little (in a pocket), but sometimes has to do a lot very quickly (rendering a webpage, playing a video, and so on). To improve battery life, the processor inside the phone can be built from a mixture of simple, power-efficient cores that handle background tasks, and some bigger brawny cores for more intensive tasks. Traditional Linux kernels would treat all of these cores the same, scheduling work equally across each of them. This would in some cases actually decrease system performance over having a smaller number of bigger cores.
EAS overcomes the challenges of heterogeneous systems by using a separate Energy Model (EM) that describes the relative performance of each core in terms of how much energy it needs (in joules) to do a certain amount of work. EAS enables the scheduler to understand the notion of ‘capacity’ and to place processes where they can get the most benefit using “energy-aware task placement”. It is already shipping in a number of recent Android phones but is likely to see use beyond the mobile market with time.