Re: [PATCH 2/2] sched: cpufreq: Adds a field cpu_power in the task_struct

From: Ruchi Kandoi
Date: Mon May 18 2015 - 17:18:55 EST


On Fri, May 15, 2015 at 9:07 AM, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> On Thu, May 14, 2015 at 04:55:48PM -0700, Ruchi Kandoi wrote:
> > cpu_power has been added to keep track of amount of power each task is
> > consuming. cpu_power is updated whenever stime and utime are updated for
> > a task. power is computed by taking into account the frequency at which
> > the current core was running and the current for cpu actively
> > running at hat frequency.
> >
>
> Both you patches completely lack any reason for me to even start
> considering this.
>
> _WHY_ and _what_ are you doing?

We need a mechanism in which we can get information about how much cpu
power each of the process(which is then aggregated fro each
uid/application) is consuming. In the current architecture, it is
based on the amount of the time the process ran. This brings in
inaccuracy because running x seconds at low frequency will have
different power consumption as compared to running at the higher
frequency. With these changes we have the information about the power
which is not only dependent on the time it was running but also takes
into account the frequency it was running at as well as the CPU # it
was running at. Because the cost of running at different CPUs at the
same frequency is different. This gives a better overview of the
current power state of the system wrt cpu power. Please let me know if
more information is required for the same.

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