public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pedro Venda <pjlv@mega.ist.utl.pt>
To: davej@codemonkey.org.uk
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Trivial update: option for default ondemand cpufreq governor
Date: Thu, 18 Nov 2004 00:43:01 +0000	[thread overview]
Message-ID: <419BF015.3050900@mega.ist.utl.pt> (raw)

This is a trivial patch that adds a Kconfig option to select the
*ondemand* cpufreq governor as the *default cpufreq governor*.

It seemed as useful as the other default governor options, and since
nobody else did it, here it is.

Feedback would be very appreciated. Also, please note that this is my first patch.

Applies cleanly to 2.6.10-rc2, 2.6.10-rc2-bk2 and 2.6.10-rc2-mm1.
Applies to 2.6.9 sources with line offset errors only.

Signed-off-by; Pedro Venda <pjlv@mega.ist.utl.pt>

diff -uprN linux-2.6.10-rc2-original/drivers/cpufreq/Kconfig linux-2.6.10-rc2/drivers/cpufreq/Kconfig
--- linux-2.6.10-rc2-original/drivers/cpufreq/Kconfig	2004-11-17 23:37:48.000000000 +0000
+++ linux-2.6.10-rc2/drivers/cpufreq/Kconfig	2004-11-17 23:52:32.153215407 +0000
@@ -65,6 +65,15 @@ config CPU_FREQ_DEFAULT_GOV_USERSPACE
  	  program shall be able to set the CPU dynamically without having
  	  to enable the userspace governor manually.

+config CPU_FREQ_DEFAULT_GOV_ONDEMAND
+	bool "ondemand"
+	select CPU_FREQ_GOV_ONDEMAND
+	help
+	  Use the CPUFreq governor 'ondemand' as default. This uses a
+	  polling mechanism to dynamically change frequency based on
+	  the CPU utilization. The desired functioning of this governor
+	  depends on the CPU capability to do fast frequency switching.
+	
  endchoice

  config CPU_FREQ_GOV_PERFORMANCE
diff -uprN linux-2.6.10-rc2-original/include/linux/cpufreq.h linux-2.6.10-rc2/include/linux/cpufreq.h
--- linux-2.6.10-rc2-original/include/linux/cpufreq.h	2004-11-17 23:38:07.000000000 +0000
+++ linux-2.6.10-rc2/include/linux/cpufreq.h	2004-11-17 23:53:48.000000000 +0000
@@ -323,6 +323,9 @@ extern struct cpufreq_governor cpufreq_g
  #elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE)
  extern struct cpufreq_governor cpufreq_gov_userspace;
  #define CPUFREQ_DEFAULT_GOVERNOR	&cpufreq_gov_userspace
+#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND)
+extern struct cpufreq_governor cpufreq_gov_dbs;
+#define CPUFREQ_DEFAULT_GOVERNOR	&cpufreq_gov_dbs
  #endif



-- 

Pedro João Lopes Venda
email: pjlv@mega.ist.utl.pt
http://arrakis.dhis.org




             reply	other threads:[~2004-11-18  0:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-18  0:43 Pedro Venda [this message]
2004-11-18  2:32 ` [PATCH] Trivial update: option for default ondemand cpufreq governor Dmitry Torokhov
2004-11-18 13:25   ` Pedro Venda

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=419BF015.3050900@mega.ist.utl.pt \
    --to=pjlv@mega.ist.utl.pt \
    --cc=davej@codemonkey.org.uk \
    --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