Kernel Watch
Jon Masters summarises the latest happenings in the Linux kernel, so you don’t have to.
Linus Torvalds announced the release of Linux 5.5-rc7, and implied that it could be the last before 5.5 (although he wasn’t sure if he would need an rc8). In any case, it is certain that Linux 5.5 will be out imminently. The release of 5.5 will bring the opening of the “merge window” during which features intended for 5.6 will be merged.
One of the features we already anticipate landing in 5.6 will be support for the Wireguard VPN. Wireguard “aims to be much simpler and easier to audit than Ipsec” and is made specifically for inclusion into the Linux kernel. It is only a few thousand lines of code and is well-supported by distributions. It is also (apparently) quite easy to use.
Thermal pressure
Modern microprocessors perform (as many as) billions of calculations every second. The rate at which these occur depends upon many factors, but one of them is the frequency of the processor, or literally how many times transistors within it switch on and off every second. Each time a transistor switches, it consumes a little energy and generates a little heat. Some additional heat is lost due to static effects of modern silicon, unrelated to processor activity.
Processors need to keep their overall heat (and energy consumption) within certain envelopes. One of those popularly quoted in the press (hey that’s us!–ed) is TDP (thermal design power), or the amount of heat that the cooling system can dissipate. In a phone, the ‘cooling system’ is often the case of the phone, conducting heat away from the chip and into your pocket. As a result, mobile devices in particular must operate under some very tight constraints.
The dynamic power consumption of transistors is a function of voltage squared times frequency. Consequently, lowering voltage and frequency has a dramatic effect on power (and heat). As a result, modern processors use a feature known as DVFS (dynamic voltage and frequency scaling) to rapidly make such adjustments on the fly. Often, this is done to save energy (and battery life).
When that is the case, the OS scheduler can usually influence the process, trading power for performance when applications need instant responsiveness. Sometimes processors need to cap performance due to heat. When this happens, the operating system may have no idea what’s going on. Enter the Linux Thermal Pressure patches. Thara Gopinath posted version 7 of a series intended to teach the scheduler to better place tasks (applications) in accordance with the thermal ‘pressure’ seen by a system over time. Linux will monitor when thermal throttling occurs and spread out task placement over a range of processor cores to try to reduce pressure and regain performance.
On a related note, the ‘IV edition of the Power Management and Scheduling in the Linux Kernel (OSPM) summit’ will be in Pisa from 11-13 May.