lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 5 Apr 2010 19:40:43 -0700
From:	Mike Chan <mike@...roid.com>
To:	balbir@...ux.vnet.ibm.com
Cc:	Paul Menage <menage@...gle.com>, cpufreq@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH] sched: cpuacct: Track cpuusage per cpu frequency

On Mon, Apr 5, 2010 at 7:15 PM, Balbir Singh <balbir@...ux.vnet.ibm.com> wrote:
> * menage@...gle.com <menage@...gle.com> [2010-04-05 12:52:57]:
>
>> On Mon, Apr 5, 2010 at 12:33 PM, Mike Chan <mike@...roid.com> wrote:
>> > New file: cpuacct.cpufreq when CONFIG_CPU_FREQ_STATS is enabled.
>> >
>> > cpuacct.cpufreq accounts for cpu time per-cpu frequency, time is exported
>> > in nano-seconds
>>
>> Can you clarify the wording of this (and describe it in the relevant
>> Documentation/... file)? It's not clear.
>>
>> From the code, it appears that the file reports a breakdown of how
>> much CPU time the cgroup has been consuming at each different CPU
>> frequency level. If so, then you probably want to reword the
>> description to avoid "per-cpu", since that makes it sounds as though
>> it's reporting something, well, "per CPU".
>>
>> Also, what's the motivation here? If it's for power monitoring
>> purposes, might it be simpler to just report a single number, that's
>> the integral of the CPU usage by frequency index (i.e. calculated from
>> the same information that this patch is already gathering in
>> cpuacct_charge()) rather than dumping a whole table on userspace?
>
> As utilization increases, won't the integral quickly overflow? BTW,
> Mike have you looked at the scaled accounting infrastructure we have
> in taskstats?
>

I just looked (thanks for pointed that out, it was new to me, thx!).
The problem here is that the accounting scales time based of cpu
speed. As it currently stands it will not represent power tracking
accurately as the power consumption of running at 1ghz / 2 != 500mhz.
We would have to register a weight factor for each speed and those
would have to be registered from the board files (at least in the ARM
world), since voltage levels can vary across projects.

-- Mike

> --
>        Three Cheers,
>        Balbir
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ