public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Filip <bugtraq@smoula.net>
To: linux-kernel@vger.kernel.org
Subject: cpufreq regression, unable to set lower frequency
Date: Thu, 21 Aug 2008 19:51:41 +0200	[thread overview]
Message-ID: <1219341101.9264.4.camel@localhost> (raw)

[-- Attachment #1: Type: text/plain, Size: 2031 bytes --]

Hi LKML,

I've upgraded my kernel few days earlier and suddenly my cpufreqd
stopperd working. My configuration is this:
AC adapter connected:
  set scaling_max_freq and scaling_min_freq to maximal available
frequency
AC adapter disconnected:
  set scaling_max_freq to maximal available, scaling_min_freq to minimal
available.

When I connect AC adapter, everything works fine but when I disconnect
my adapter, everything remains on maximal frequency and in logs I can
see:

cpufreqd: cpufreqd_set_profile: Couldn't set profile "Powersave Low" set
for cpu0

After some tests I've traced problem to 

http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.25.y.git;a=commitdiff;h=53391fa20cab6df6b476a5a0ad6be653c9de0c46

What do you think? Is this condition correct?

# cd /sys/devices/system/cpu/cpu0/cpufreq/

when AC adapter is connected, something like this should happen:
# cat scaling_available_frequencies 
2167000 2000000 1833000 1667000 1500000 1333000 1000000 
# echo 2167000 > scaling_max_freq 
# echo 2167000 > scaling_min_freq 

when disconnected, something like this should:
# echo 1000000 > scaling_max_freq 
-su: echo: write error: Invalid argument
# echo 1000000 > scaling_min_freq

after min is set, max can be lowered to. Before this patch, lowering max
below min lead to lowering of min to the same value.

I think that this whole condition must not be here at all. After
removing this condition the kernel behaves like this:


# cat scaling_min_freq scaling_max_freq 
2167000
2167000
# echo 1000000 > scaling_max_freq
# cat scaling_min_freq scaling_max_freq
1000000
1000000
# echo 2167000 > scaling_min_freq
# cat scaling_min_freq scaling_max_freq
1000000
1000000
# echo 2167000 > scaling_max_freq
# echo 2167000 > scaling_min_freq
# cat scaling_min_freq scaling_max_freq
2167000
2167000


Which I think is not perfect but is better then current behavior. What
do you think?

-- 
Martin Filip <bugtraq@smoula.net>
jabber: nexus@smoula.net

[-- Attachment #2: Toto je digitálně podepsaná část zprávy --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

             reply	other threads:[~2008-08-21 18:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-21 17:51 Martin Filip [this message]
2008-08-21 22:55 ` cpufreq regression, unable to set lower frequency Mattia Dongili
2008-08-22  8:12   ` Andrew Morton

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=1219341101.9264.4.camel@localhost \
    --to=bugtraq@smoula.net \
    --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