cpufreq Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Braun <Felix.Braun@mail.mcgill.ca>
To: CPUFreq@lists.linux.org.uk
Subject: [PATCH 2.6.14 2/2] cpufreq_conservative units weirdness
Date: Fri, 2 Dec 2005 14:25:25 +0100	[thread overview]
Message-ID: <20051202142525.07d142a9@tilion.getrex.org> (raw)
In-Reply-To: <20051202135956.5d7299c1@tilion.getrex.org>

It seems to me that there is some discrepancy between cpufreq_ondemand and
cpufreq_conservative. Specifically, the ondemand driver allows a minimum
sampling rate of 500 times the transition latency. However, in the
conservative driver increases the DEFAULT_MULTIPLIER from 1000 to 100000
without adjusting MIN_SAMPLING_RATE accordingly.

To correct this behaviour, it would be possible to simply adjust the
DEFAULT_MULTIPLIER to 1000, however, this would change the behaviour of
the default install. Instead I suggest adjusting the minimum sample rate
so that people who want to adjust their sampling rates to lower values
(which should still be safe) can chose to do so.

------

Allow users of cpufreq_conservative the same minimum sampling rate than
what is allowed by cpufreq_ondemand.

Signed-off-by: Felix Braun <Felix.Braun@mail.McGill.ca>

------

diff -ruN a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
--- a/drivers/cpufreq/cpufreq_conservative.c    2005-12-02 13:19:48.000000000 +0100
+++ b/drivers/cpufreq/cpufreq_conservative.c    2005-12-02 13:21:11.000000000 +0100
@@ -54,7 +54,7 @@
  * All times here are in uS.
  */
 static unsigned int                            def_sampling_rate;
-#define MIN_SAMPLING_RATE                      (def_sampling_rate / 2)
+#define MIN_SAMPLING_RATE                      (def_sampling_rate / 200)
 #define MAX_SAMPLING_RATE                      (500 * def_sampling_rate)
 #define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER   (100000)
 #define DEF_SAMPLING_DOWN_FACTOR               (5)

      reply	other threads:[~2005-12-02 13:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-02 12:59 [PATCH 2.6.14 1/2] cpufreq_conservative units weirdness Felix Braun
2005-12-02 13:25 ` Felix Braun [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=20051202142525.07d142a9@tilion.getrex.org \
    --to=felix.braun@mail.mcgill.ca \
    --cc=CPUFreq@lists.linux.org.uk \
    /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