public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Cristi Magherusan <cristi.magherusan@net.utcluj.ro>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: Power management stuff
Date: Sat, 6 Sep 2008 22:40:00 +0100	[thread overview]
Message-ID: <20080906214000.GA28166@srcf.ucam.org> (raw)
In-Reply-To: <1220732386.18701.68.camel@localhost>

On Sat, Sep 06, 2008 at 11:19:46PM +0300, Cristi Magherusan wrote:

> 1) How could we get the current frequency/voltage settings for the CPU,
> fr example when using SpeedStep by using the /proc filesystem?

The current frequency can be read from either /proc/cpuinfo or 
/sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq . The voltage 
isn't exposed.

> 2) It would be nice to modify a bit the CPU throttling API to be able to
> set a max value when using dynamic governors, like ondemand. 
> The frequency/voltage pair should be set to the minimum allowed by
> construction, just like it was before, and scale up to a max value set
> by the user. This would allow the user set the best balance between
> responsiveness and power consumption that suits its needs.

/sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq - though on x86, 
setting this to anything other than the maximum will result in more 
power consumption, not less.

> Also, targeting a certain temperature would be a great feature to have.

I've done some patches for this, but they're not currently merged.

> 3) Is there any plan to improve the current battery framework and
> provide information about the estimated recharging time, as it was
> before. I guess the versions before 2.6.24 used to provide this but the
> newer versions don't do it anymore.

No, you can do that in userspace. Charge time has only been exposed for 
apm, and that's because the BIOS gave it to us. Accurate figures are 
going to require learning the behaviour of the specific battery, and 
there's no way to do that sensibly in kernel.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

      reply	other threads:[~2008-09-06 21:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-06 20:19 Power management stuff Cristi Magherusan
2008-09-06 21:40 ` Matthew Garrett [this message]

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=20080906214000.GA28166@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=cristi.magherusan@net.utcluj.ro \
    --cc=linux-kernel@vger.kernel.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