linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Matthias Grimm <joker@cymes.de>,
	LinuxPPC-Dev <linuxppc-dev@lists.linuxppc.org>
Subject: Re: Design weakness in /proc/pmu ?!
Date: Thu, 18 Apr 2002 20:31:47 +0200	[thread overview]
Message-ID: <20020418183148.25976@smtp.wanadoo.fr> (raw)
In-Reply-To: <3CBF14C1.6080802@cymes.de>


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

  reply	other threads:[~2002-04-18 18:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-18 18:47 Design weakness in /proc/pmu ?! Matthias Grimm
2002-04-18 18:31 ` Benjamin Herrenschmidt [this message]
2002-04-18 20:56   ` Joseph P. Garcia
2002-04-19 16:32     ` Matthias Grimm
2002-04-19 17:06       ` Benjamin Herrenschmidt

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=20020418183148.25976@smtp.wanadoo.fr \
    --to=benh@kernel.crashing.org \
    --cc=joker@cymes.de \
    --cc=linuxppc-dev@lists.linuxppc.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;
as well as URLs for NNTP newsgroup(s).