Google's CPUFreq "Interactive" Governor Looks To Go Mainline
A set of 70 kernel patches published today implement an "interactive" governor for the CPUFreq scaling driver, which has been developed by several mobile software/hardware companies.
Bálint Czobor published the patch-set today on the Linux Kernel Mailing List for implementing this interactive governor in CPUFreq. The patch set explains this governor:
This governor has been around since 2011 outside of the mainline kernel tree. It's already been part of the Android kernel. Now hopefully the interactive governor will land in the mainline Linux kernel (perhaps for Linux 4.4, if not too late) thanks to this massive patch series. Once it's mainline, I'll work on some desktop tests with this governor to see how it compares. The interactive governor complements the existing performance, powersave, userspace, ondemand, and conservative modes.
Bálint Czobor published the patch-set today on the Linux Kernel Mailing List for implementing this interactive governor in CPUFreq. The patch set explains this governor:
This governor is designed for latency-sensitive workloads, such as interactive user interfaces. The interactive governor aims to be significantly more responsive to ramp CPU quickly up when CPU-intensive activity begins.This interactive governor should be particularly of interest for Linux-powered mobile devices. In fact, the governor has been around for a while outside of the mainline kernel. Some of the CPUFreq interactive governor patches are authored by Google developers as well as Samsung, Motorola, Code Aurora, and NVIDIA.
Existing governors sample CPU load at a particular rate, typically every X ms. This can lead to under-powering UI threads for the period of time during which the user begins interacting with a previously-idle system until the next sample period happens.
The 'interactive' governor uses a different approach. Instead of sampling the CPU at a specified rate, the governor will check whether to scale the CPU frequency up soon after coming out of idle. When the CPU comes out of idle, a timer is configured to fire within 1-2 ticks. If the CPU is very busy from exiting idle to when the timer fires then we assume the CPU is underpowered and ramp to MAX speed.
This governor has been around since 2011 outside of the mainline kernel tree. It's already been part of the Android kernel. Now hopefully the interactive governor will land in the mainline Linux kernel (perhaps for Linux 4.4, if not too late) thanks to this massive patch series. Once it's mainline, I'll work on some desktop tests with this governor to see how it compares. The interactive governor complements the existing performance, powersave, userspace, ondemand, and conservative modes.
12 Comments