Thread (5 messages) 5 messages, 3 authors, 2002-04-19

Re: Design weakness in /proc/pmu ?!

From: Joseph P. Garcia <hidden>
Date: 2002-04-18 20:56:10

Greetings Ben, Matthias, and others.

On Thu, 18 Apr 2002 20:31:47 +0200
Benjamin Herrenschmidt [off-list ref] wrote:
It's difficult to find a suitable answer. The time remaining is
obtained directly from the PMU  on newer machines, we don't really
have the proper algorithm to calculate it on these, what
machine did you get those dumps from ? We may simply have a bug
on older machine calculation causing that 0, in which case it
has to be fixed.
Each battery in the current code is handled seperately.  Each battery has
its own value for current.  A battery not in use has a value of 0, which
the time calculations handle by saying 0 time left, as if you're plugged in
and not charging, this is what would be expected.

So its not really a bug, just an implemenetation decision that mirrors the
hardware.  But I'm all for Matthias' suggestion.  The alternative is to do
what I had the gkrellm pmu plugin do. (without letting it know how to
redundantly find the time on its own just using ratios, but that assumes a
linear function)

--
Joseph P. Garcia    http://www.lycestra.com/    http://lidar.ssec.wisc.edu/
CS Undergraduate                      Student Employee - Systems Programmer
University of Wisconsin - Madison                            UW Lidar Group

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help