From: Michal Hocko <mstsxfx@gmail.com>
To: Alexey Starikovskiy <astarikovskiy@suse.de>
Cc: power@bughost.org, arjan@linux.intel.com, linux-kernel@vger.kernel.org
Subject: Re: Why is /sys/class/power_supply/CMB1/energy_now not exported?
Date: Tue, 22 Jul 2008 08:19:25 -0600 [thread overview]
Message-ID: <20080722141925.GA5593@dhcp35.suse.cz> (raw)
In-Reply-To: <488574CF.7010501@suse.de>
On Tue, Jul 22, 2008 at 09:49:03AM +0400, Alexey Starikovskiy wrote:
> It looks like you use current_now as power, not multiplying it by voltage.
You are right, my calculation are simply wrong. I have mixed remaining
capacity (calculated for 2.6.25-2 and 2.6.26) with remaining capacity
and some nonsense for the first 2.6.25 (table below was updated).
Nevertheless, what can be the reason for such a different result for
distrbution kernel?
> You should either not multiply anything, then you have similar units -- charge and current,
> or multiply _both_ by voltage_now, then again you have similar units -- power and energy.
> In these both cases you'll have hours or remaining capacity.
>
[...]
>>
>> 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 |
>> ---------------------------------------------------------------------------
reported | 3.5 41.7 3.6
capacity |
---------------------------------------------------------------------------
calculated | 3.46 3.63 3.69
capacity |
===========================================================================
[...]
--
Michal Hocko
next prev parent reply other threads:[~2008-07-22 14:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080721041213.GA3491@dhcp35.suse.cz>
[not found] ` <48841AE3.3000004@suse.de>
[not found] ` <20080721165921.GB3491@dhcp35.suse.cz>
[not found] ` <4884F98F.4060903@suse.de>
2008-07-22 3:04 ` Why is /sys/class/power_supply/CMB1/energy_now not exported? Michal Hocko
2008-07-22 5:49 ` Alexey Starikovskiy
2008-07-22 14:19 ` Michal Hocko [this message]
2008-09-04 19:40 ` Michal Hocko
2008-09-16 17:22 ` Kok, Auke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080722141925.GA5593@dhcp35.suse.cz \
--to=mstsxfx@gmail.com \
--cc=arjan@linux.intel.com \
--cc=astarikovskiy@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=power@bughost.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox