lkml.org 
[lkml]   [2010]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] sched: cpuacct: Track cpuusage for CPU frequencies
    Date
    On Friday 09 April 2010 10:50:33 pm Mike Chan wrote:
    > 2010/4/9 Thomas Renninger <trenn@suse.de>:
    > > On Wednesday 07 April 2010 03:21:59 Mike Chan wrote:
    > >> New file: cpuacct.cpufreq when CONFIG_CPU_FREQ_STATS is enabled.
    > >>
    > >> cpuacct.cpufreq reports the CPU time (nanoseconds) spent at each CPU
    > >> frequency
    > >>
    > >> Maximum number of frequencies supported is 32. As future architectures
    > >> are added that support more than 32 frequency levels, CPUFREQ_TABLE_MAX
    > >> in sched.c needs to be updated.
    > >
    > > Why is accounting of each frequency needed?
    >
    > The intent is to track time spent at each cpu frequency to measure
    > power consumption. Userspace can figure out the mapping between
    > frequency and power consumption. This is also a useful indication of
    > what kind of hw performance userspace apps need (does Chrome really
    > need 1ghz?).
    >
    > Paul Menage had suggested an integral earlier in my [RFC] patch. I
    > wasn't completely against the idea but it had a few shortcomings that
    > I couldn't think of decent solutions for. You would have to either
    > pre-define power consumption for the cpu frequences per-arch or board
    > file. Or have a way to calculate.
    Sounds as if this is for specific CPUs/boards only then.
    X86 boosting and PCC driver are hard, possibly impossible to track (in respect
    to real power consumption).

    > > pcc-cpufreq driver can do every frequency in a range and supports
    > > hundreds of different frequencies, thus it does not depend on
    > > CPU_FREQ_TABLE. Would the average frequency be enough to track/account?
    > Humm, this is a tricky case we haven't yet run into for ARM. Average
    > frequency might not be too useful because power is not linear with
    > speed. We could possibly have buckets for speeds (hi/lo).
    Your whole concept sounds as if it requires limited amount of frequencies.
    Don't mind for the special case I mentioned.

    Thomas


    \
     
     \ /
      Last update: 2010-04-12 22:05    [W:2.704 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site