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

Re: Design weakness in /proc/pmu ?!

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2002-04-18 18:31:47

As you could see battery 0 is fully charged but the time remaining value
is calculated as zero. If you now calculate the overall time remaining
simply as sum of the time rem. of each battery you will get a wrong time
and possibly bother the user with unnessecary warnings.

I suggest to move the time rem. value out of the /proc/battery_* files
into the /proc/info file and store an overall time-remaining value
there. Because the time until power off is a quality of the whole system
mainly defined through the overall power consumption. It isn't a feature
of a single battery.

What do you think?
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.

Ben.


** 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