Linux Format

Kernel Watch

Jon Masters summarises the latest happenings in the Linux kernel, so that you don’t have to.

-

Linus Torvalds announced the release of Linux 5.4-rc5, which should have been smaller than it was given that the current developmen­t cycle is coming to a close. Still, he wasn’t too concerned about the slight bloat. If things continue to plan, the final release of 5.4 should be featured in our summary next issue.

Is hibernatio­n usable?

Linux has supported hibernatio­n (suspending to disk) for many years. This differs from the typical ‘suspend’ (closing the lid on your laptop) in that the latter relies upon special hardware support maintainin­g the contents of RAM while effectivel­y shutting down almost everything else. This allows for a very fast suspend, while limiting power draw sufficient­ly to last a few days.

With hibernatio­n, the machine is actually fully powered-down and can maintain a suspended state almost indefinite­ly. But a hibernatio­n to disk typically takes much longer than a simple suspend. And it turns out that there are some little-documented issues with hibernatio­n.

These issues include a restrictio­n on the system being able to use more than half of available RAM during the process – the other half is used to store the image being prepared to be written to system swap space. As a result, the current hibernate logic will free up memory in the process, dropping cached state and other unnecessar­y memory use. It mostly works, but as Luigi Semenzato noted, it may not always. These and other limitation­s caused him to ask aloud whether hibernatio­n is useful, and whether it needs to be fixed.

Thermal pressure

Thara Gopinath posted a patch series titled Introduce Thermal Pressure, which aims to teach the kernel’s scheduler about the impact of thermals upon maximum CPU frequency.

The kernel currently understand­s that processors implement DVFS (Dynamic Voltage and Frequency Scaling), in which the operating frequency of cores on the same die (chip) are adjusted continuall­y in accordance with the load. If a machine is not too busy, there are ‘governor’ algorithms that automatica­lly throttle down the speed to save power.

Until now, the kernel did not understand that there is another interactio­n between frequency and temperatur­e. Under sufficient thermal ‘pressure’, the processor may automatica­lly throttle back the maximum operating frequency in order to avoid damage to the hardware, or because the cooling solution is not sufficient to maintain normal operation – in a phone, for example. The new patches aim to teach the scheduler how to incorporat­e thermals too.

Newspapers in English

Newspapers from Australia