Ferron, Chris E wrote:
On Thu, Nov 1, 2012 at 5:00 AM, Igor Zhbanov
> * Initial voltage and frequency values *
> When PowerTOP starts on system with display turned on and some graphical
> applications already running, there is a possibility for situation where some
> rendering job will be started before PowerTOP grabs the first voltage or
> frequency setting event. So PowerTOP will be unaware of current frequency
> and/or voltage value. Because of this it is impossible to correctly calculate
> power consumption for that task because it is impossible to ask the driver
> about current frequency and voltage. And in the current version PowerTOP drops
> jobs before first voltage or frequency change event (such events are frequent
> enough, so it's not a problem). It is possible to use some default value but
Gaining defaults and baselines is a pretty generic issues. To increase
samples and such, have you
considered using the calibration to help here?
> it will be GPU-dependent and we don't know what value to use.
The Powertop doesn't have the ability to calibrate GPU now. It is possible to refine
the C constant by the means of calibration. But we still would not know at what voltage
and frequency the rendering job (that was started before the Powertop) running.
Fortunately, these rendering jobs takes less than a second usually. So probably
we could ignore them.
The better solution could be if we had some support from GPU driver to ask for current
frequency and voltage.
By the way, I now study the possibility to adopt another approach. Consider what would be
if we had CPU and GPU power consumption statistics right inside the kernel. I don't
the current way when the Powertop must handle several thousands events per second
of catching every sched_switch and sched_wakeup events that could happen CONFIG_HZ *
times every second) just to calculate single number (usage) for each process.
The kernel knows what is the current voltage and frequency for each process.
Also it knows the duration of each time slice. So the kernel could easily compute on each
task switch how much power was consumed by particular task and update its counter.
Then the Powertop could just grab these counters periodically.
This feature could have on/off switch via sysctl to be turned only for some time.
I think that this way is better. Also it significantly reduces the amount of work
by the Powertop. What you think?
phone: +7 (495) 797 25 00 ext 3806
Mobile group, Moscow R&D center, Samsung Electronics
12 Dvintsev street, building 1
127018, Moscow, Russian Federation