Re: Why is /sys/class/power_supply/CMB1/energy_now not exported?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Michal Hocko
Date: Monday, July 21, 2008 - 8:04 pm

[fixing bad linux kernel mailing list email address - sorry, but gmail's
thrown mailing delivery error to the spam]

On Tue, Jul 22, 2008 at 01:03:11AM +0400, Alexey Starikovskiy wrote:

Hi Alexey,


I have made some experiments and the result is quite surprising to me.
It seems that this problem is somehow related to Debian distribution
kernel, because I wasn't able to reproduce it with the Vanilla kernel (I
had to screw something up last time when I have checked that and
reported in the original message).

I have tried 3 configurations:
* 2.6.25 - Vanilla kernel with config-2.6.25 config and result output in
  powertop-2.6.25-good
* 2.6.25-2 - Debian distribution kernel with config-2.6.25-2 config and
  powertop-2.6.25-2-bad output
* 2.6.26 - Vanilla kernel with config-2.6.26 config and result output in
  powertop-2.6.26-good

with the following scenario (powertop patched with attached
charge-read.patch):
* wait for /sys/class/power_class/CMB1/status FULL on AC
* get values from all files in ..CMB1 to output file
* unplug AC
* run powertop
* get values from all files in CMB1 again to the same file
* get output of power consumption to the output file


             |  2.6.25          2.6.25-2        2.6.26
===========================================================================
voltage_now  |  12222000        12206000        12218000
charge_now   |  4850000         4850000         4850000
current_now  |  1398000         1334000         1313000
---------------------------------------------------------------------------
reported     |  16.6            1.4             16.3
consumption  |
---------------------------------------------------------------------------
calculated   |  24.5            3.63            3.69
consumption  |
===========================================================================

Charge value is stable for all 3 configurations and current_now is
2.5.25 > 2.6.25-2 > 2.6.26 so I would expect that reported consumption
is for 2.6.25-2 would be somewhere between values for good
configurations. 

If I use your calculation (charge_now/current_now), than the results are
even more confusing, because 2.6.26 are similar to 2.6.25-2 (but reported
value is like I would expect).

Someone has an idea what could be wrong?


-- 
Michal Hocko
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Why is /sys/class/power_supply/CMB1/energy_now not exp ..., Michal Hocko, (Mon Jul 21, 8:04 pm)
Re: Why is /sys/class/power_supply/CMB1/energy_now not exp ..., Alexey Starikovskiy, (Mon Jul 21, 10:49 pm)