git: powerd - Initial load monitor and cpu frequency adjustment daemon

Matthew Dillon dillon at
Mon Jun 28 20:30:18 PDT 2010

:One more thing, if you want to change freq for all cpu domains,
:hw.acpi.cpu.px_global, which sets freq of all cpu domains, could be
:used, in lue of iterating all cpu domains :)
:Best Regards,

    Yah, I saw that, and was tempted to avoid the dom scan.  But after
    thinking about it for a little bit I decided to set the groundwork
    for a more sophisticated handling of the load.  Which, p.s. I would
    love someone to implement!

    Here's what I am thinking.  If multiple domains are available we
    could add support for a global userland thread scheduler cpu mask that
    powerd is able to control.  We already have cpu masks via the
    usched_set() command, we just don't have a global cpu collapse mask
    for use by something like powerd.  It would be pretty easy to do.

    Then based on the cpu load, where 1.0 == one fully saturated cpu,
    we could speed up just N domains based on the load instead of all of
    them and restrict user processes to the related cpus for those specific
    domains.  Once the load climbs to ncpus all the domains would be
    throttled up to full and all cpus enabled.

    Right now I just turn up or down all the cpus because powerd has no
    control over which one(s) get the processes.  (also the load
    calculation has to be done across all of them for the same reason,

    It also occurs to me that if we had this feature in powerd we could
    make use of the overclocking available on the 6-core cpus (where some
    of the cpus can be overclocked if the remaining are idle).  In anycase,
    something like this is really needed now that AMD has gone to 6-core.
    We will probably be seeing 8-core within a year.


More information about the Commits mailing list