On Mon, 6 Jan 2014 00:00:00 +0200
Siarhei Siamashka <[email protected]> wrote:

> A better solution is to really ramp up the CPU to the maximum clock
> speed if we have some external power source connected (ACIN or VBUS).
> Adhering to the "principle of least surprise", it makes sense to fork
> the "ondemand" governor with some new name and make it the default.

A new governor (and a platform-specific one, no less)  is unlikely to ever be
mainlined. Try mainlining those "fantasy" or "interactive", you'll more likely
be <del>laughed out of the building</del> politely pointed to all the tunables
of "ondemand", some of which I just listed in my other E-Mail.

If you *really* want to react to power events, there is no reason a userspace
program can't change max/min_frequency of the ondemand governor, or even
switch between ondemand and performance as the power situation allows; it could
be either a daemon or a oneshot script called from udev(?), if changes are only
required on plugging/unplugging of power source. In fact I think there should
be something like that already (designed for laptops).

> The users will be able to lookup the name of this new governor in
> google and find linux-sunxi wiki with the detailed explanations
> about how it works :-) Now what it really should do:
> 1. It can subscribe to the notifications from AXP209 about
>    plugging/unplugging the external power sources and run the CPU
>    at the maximum speed when external power is available.
>    This should solve all the performance issues for the
>    development boards and any devices running from the external
>    power sources. I believe that this is exactly the primary use
>    case for the vast majority of linux-sunxi users :-)
> 2. It might include the tweaks from http://linux-sunxi.org/Cpufreq
>    in the case if they are confirmed to be useful when running on
>    a battery.
> 3. In the case if we have only microusb connected and can take only
>    500 mA from it, then we might be interested in preventing the
>    battery from eventually getting drained. As we know, even the
>    CPU alone can cause more than 500 mA consumption if really
>    stressed. The cpufreq governor may try to limit the maximum
>    CPU clock speed if the LiPo battery charge is low and only
>    microusb is connected for charging it.
> 4. Maybe do something to prevent SoC overheating if CPU, Mali and
>    Cedar are all used at the same time? AXP209 has some ADC and we
>    might try to limit the CPU / Mali / Cedar clock frequencies
>    if the power drain is too high. But the properly working thermal
>    sensor in A10 / A20 (if it exists) would be of course a better
>    solution.

-- 
With respect,
Roman

Attachment: signature.asc
Description: PGP signature

Reply via email to