Re: [PATCH v2 0/3] Enable CPU frequency and power tracking in cpuacct cgroup

2010-06-01 Thread Mike Chan
On Fri, May 21, 2010 at 10:05 AM, Kevin Hilman
 wrote:
> Mike Chan  writes:
>
>> On Thu, May 20, 2010 at 2:01 PM, Thomas Renninger  wrote:
>>> Hi Mike,
>>>
>>> On Thursday 20 May 2010 08:42:21 pm Mike Chan wrote:
 v2:
 Rebased off of Thomas Renninger's patch for cgroups_cpuacct refactoring,
>>> thanks.
>>> A general comment:
>>> I don't know much about the cgroup stuff.
>>
>> Perhaps Paul Menage or Balbir Singh can look and sign off on the API's?
>>
>>> I am also not sure how exactly power can be measured on this arch based on
>>
>> If you know how much time was spent at each frequency executing code,
>> you can calculate how much power was consumed if the platform (with
>> hooks) provide power numbers (in milliWatts) for the power at
>> frequency X.
>>
>> I did some initial testing on Motorola Droid comparing to a power
>> meter and I got within 2% variance.
>>
>>> frequency accounting (there also were some threads I was not aware of?)
>>> A signed-off-by or reviewed-by from someone who is more involved in this 
>>> omap
>>> stuff would probably not that bad.
>>>
>>
>> OMAP was the closest with mainline support I could provide an example
>> how to use these hooks.
>>
>> I'm hoping for some blessing from some people on the linux-omap list
>> for that. However can we possibly just stack the first two patches to
>> get the API in? This will make it easier to fixup the omap hooks if
>> they don't get in.
>
> This looks like a great enhancement to me.
>
> Speaking for OMAP PM... I'd suggest getting the generic stuff upstream
> (or into -next) soon and then work out the OMAP specifics after.
>
> Since the OMAP OPP layer is going through some churn (but stabilizing
> and will be submitted for 2.6.36), I'd suggest we queue the
> OMAP-specific parts of this along with the OPP layer changes.
>

So it looks like there is no objections to this API and I'm OK with
dropping the omap hooks for now until things are settled in 2.6.36. So
are things good with Thomas' re-factoring patch for cpuacct as well as
the first 2 patches?

-- Mike

> Kevin
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/3] Enable CPU frequency and power tracking in cpuacct cgroup

2010-05-21 Thread Kevin Hilman
Mike Chan  writes:

> On Thu, May 20, 2010 at 2:01 PM, Thomas Renninger  wrote:
>> Hi Mike,
>>
>> On Thursday 20 May 2010 08:42:21 pm Mike Chan wrote:
>>> v2:
>>> Rebased off of Thomas Renninger's patch for cgroups_cpuacct refactoring,
>> thanks.
>> A general comment:
>> I don't know much about the cgroup stuff.
>
> Perhaps Paul Menage or Balbir Singh can look and sign off on the API's?
>
>> I am also not sure how exactly power can be measured on this arch based on
>
> If you know how much time was spent at each frequency executing code,
> you can calculate how much power was consumed if the platform (with
> hooks) provide power numbers (in milliWatts) for the power at
> frequency X.
>
> I did some initial testing on Motorola Droid comparing to a power
> meter and I got within 2% variance.
>
>> frequency accounting (there also were some threads I was not aware of?)
>> A signed-off-by or reviewed-by from someone who is more involved in this omap
>> stuff would probably not that bad.
>>
>
> OMAP was the closest with mainline support I could provide an example
> how to use these hooks.
>
> I'm hoping for some blessing from some people on the linux-omap list
> for that. However can we possibly just stack the first two patches to
> get the API in? This will make it easier to fixup the omap hooks if
> they don't get in.

This looks like a great enhancement to me.

Speaking for OMAP PM... I'd suggest getting the generic stuff upstream
(or into -next) soon and then work out the OMAP specifics after.

Since the OMAP OPP layer is going through some churn (but stabilizing
and will be submitted for 2.6.36), I'd suggest we queue the
OMAP-specific parts of this along with the OPP layer changes.

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/3] Enable CPU frequency and power tracking in cpuacct cgroup

2010-05-20 Thread Mike Chan
On Thu, May 20, 2010 at 2:01 PM, Thomas Renninger  wrote:
> Hi Mike,
>
> On Thursday 20 May 2010 08:42:21 pm Mike Chan wrote:
>> v2:
>> Rebased off of Thomas Renninger's patch for cgroups_cpuacct refactoring,
> thanks.
> A general comment:
> I don't know much about the cgroup stuff.

Perhaps Paul Menage or Balbir Singh can look and sign off on the API's?

> I am also not sure how exactly power can be measured on this arch based on

If you know how much time was spent at each frequency executing code,
you can calculate how much power was consumed if the platform (with
hooks) provide power numbers (in milliWatts) for the power at
frequency X.

I did some initial testing on Motorola Droid comparing to a power
meter and I got within 2% variance.

> frequency accounting (there also were some threads I was not aware of?)
> A signed-off-by or reviewed-by from someone who is more involved in this omap
> stuff would probably not that bad.
>

OMAP was the closest with mainline support I could provide an example
how to use these hooks.

I'm hoping for some blessing from some people on the linux-omap list
for that. However can we possibly just stack the first two patches to
get the API in? This will make it easier to fixup the omap hooks if
they don't get in.

-- Mike

> Still I Iike this interface and I could imagine others hook into it as well,
> for whatever has to be cpu cgroup accounted.
>
> My two cents...,
>
>     Thomas
> --
> To unsubscribe from this list: send the line "unsubscribe cpufreq" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/3] Enable CPU frequency and power tracking in cpuacct cgroup

2010-05-20 Thread Thomas Renninger
Hi Mike,

On Thursday 20 May 2010 08:42:21 pm Mike Chan wrote:
> v2:
> Rebased off of Thomas Renninger's patch for cgroups_cpuacct refactoring,
thanks.
A general comment:
I don't know much about the cgroup stuff.
I am also not sure how exactly power can be measured on this arch based on
frequency accounting (there also were some threads I was not aware of?)
A signed-off-by or reviewed-by from someone who is more involved in this omap
stuff would probably not that bad.

Still I Iike this interface and I could imagine others hook into it as well, 
for whatever has to be cpu cgroup accounted.

My two cents...,

 Thomas
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 0/3] Enable CPU frequency and power tracking in cpuacct cgroup

2010-05-20 Thread Mike Chan
v2:
Rebased off of Thomas Renninger's patch for cgroups_cpuacct refactoring,
which is based off of linus's tree. Thomas it might be easier to merge our
patches if you take these patches and put them in a series ontop of your
original patches (presuming there are no objections to your patch).

This patch series introduces cpu frequency and power tracking for cpuacct
cgroups. A similar patch set was discussed a while back and it was concluded
that due to varying architectures (ppc, x86 with overboot) you cannot account
for frequencies and their power consumption generically in sched.c, thus we
have platform specific hooks the cpuacct can call into (if available).

This patch series is not 3 instead of 4. I have left out the power
implementation for OMAP due to implementation conflicts in linux-next.

Mike Chan (3):
  scheduler: cpuacct: Enable platform hooks to track cpuusage for CPU
frequencies
  scheduler: cpuacct: Enable platform callbacks for cpuacct power
tracking
  omap: cpu: Implement callbacks for cpu frequency tracking in cpuacct

 Documentation/cgroups/cpuacct.txt |7 
 arch/arm/plat-omap/cpu-omap.c |   67 +++-
 include/linux/cpuacct.h   |   43 +++
 kernel/cgroup_cpuaccount.c|   69 +
 4 files changed, 185 insertions(+), 1 deletions(-)
 create mode 100644 include/linux/cpuacct.h

 Signed-off-by: Mike Chan 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html