mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: davej@codemonkey.org.uk
Cc: mark.langsdorf@amd.com, cpufreq@vger.kernel.org,
	venkatesh.pallipadi@intel.com, linux-kernel@vger.kernel.org,
	Thomas Renninger <trenn@suse.de>
Subject: [PATCH 2/7] CPUFREQ: ondemand/conservative: deprecate sampling_rate{min,max}
Date: Tue,  3 Feb 2009 17:46:41 +0100	[thread overview]
Message-ID: <1233679606-1971-3-git-send-email-trenn@suse.de> (raw)
In-Reply-To: <1233679606-1971-1-git-send-email-trenn@suse.de>

The same info can be obtained via the transition_latency sysfs file

Signed-off-by: Thomas Renninger <trenn@suse.de>
---
 Documentation/cpu-freq/governors.txt   |   10 ++++++++--
 drivers/cpufreq/cpufreq_conservative.c |    4 ++++
 drivers/cpufreq/cpufreq_ondemand.c     |    5 +++++
 3 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt
index 5b0cfa6..9b18512 100644
--- a/Documentation/cpu-freq/governors.txt
+++ b/Documentation/cpu-freq/governors.txt
@@ -119,8 +119,14 @@ want the kernel to look at the CPU usage and to make decisions on
 what to do about the frequency.  Typically this is set to values of
 around '10000' or more.
 
-show_sampling_rate_(min|max): the minimum and maximum sampling rates
-available that you may set 'sampling_rate' to.
+show_sampling_rate_(min|max): THIS INTERFACE IS DEPRECATED, DON'T USE IT.
+You can use wider ranges now and the general
+cpuinfo_transition_latency variable (cmp. with user-guide.txt) can be
+used to obtain exactly the same info:
+show_sampling_rate_min = transtition_latency * 500    / 1000
+show_sampling_rate_max = transtition_latency * 500000 / 1000
+(divided by 1000 is to illustrate that sampling rate is in us and
+transition latency is exported ns).
 
 up_threshold: defines what the average CPU usage between the samplings
 of 'sampling_rate' needs to be for the kernel to make a decision on
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index 0320962..5ba0a3f 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -140,11 +140,15 @@ static struct notifier_block dbs_cpufreq_notifier_block = {
 /************************** sysfs interface ************************/
 static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf)
 {
+	printk(KERN_INFO "CPUFREQ: conservative sampling_rate_max "
+	       "sysfs file is deprecated - used by: %s\n", current->comm);
 	return sprintf (buf, "%u\n", MAX_SAMPLING_RATE);
 }
 
 static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf)
 {
+	printk(KERN_INFO "CPUFREQ: conservative sampling_rate_max "
+	       "sysfs file is deprecated - used by: %s\n", current->comm);
 	return sprintf (buf, "%u\n", MIN_SAMPLING_RATE);
 }
 
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index 6f45b16..4b42e36 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -21,6 +21,7 @@
 #include <linux/hrtimer.h>
 #include <linux/tick.h>
 #include <linux/ktime.h>
+#include <linux/sched.h>
 
 /*
  * dbs is used in this file as a shortform for demandbased switching
@@ -203,11 +204,15 @@ static void ondemand_powersave_bias_init(void)
 /************************** sysfs interface ************************/
 static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf)
 {
+	printk(KERN_INFO "CPUFREQ: ondemand sampling_rate_max "
+	       "sysfs file is deprecated - used by: %s\n", current->comm);
 	return sprintf (buf, "%u\n", MAX_SAMPLING_RATE);
 }
 
 static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf)
 {
+	printk(KERN_INFO "CPUFREQ: ondemand sampling_rate_min "
+	       "sysfs file is deprecated - used by: %s\n", current->comm);
 	return sprintf (buf, "%u\n", MIN_SAMPLING_RATE);
 }
 
-- 
1.6.0.2


  parent reply	other threads:[~2009-02-03 16:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-03 16:46 CPUFREQ: Ondemand and powernow-k8 enhancements/fixes/cleanups Thomas Renninger
2009-02-03 16:46 ` [PATCH 1/7] CPUFREQ: Introduce /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_transition_latency Thomas Renninger
2009-02-03 16:46 ` Thomas Renninger [this message]
2009-02-04  5:03   ` [PATCH 2/7] CPUFREQ: ondemand/conservative: deprecate sampling_rate{min,max} Andrew Morton
2009-02-03 16:46 ` [PATCH 3/7] CPUFREQ: ondemand/conservative: sanitize sampling_rate restrictions Thomas Renninger
2009-02-04  5:07   ` Andrew Morton
2009-02-04 10:07     ` Thomas Renninger
2009-02-03 16:46 ` [PATCH 4/7] CPUFREQ: powernow-k8: Get transition latency from ACPI _PSS table Thomas Renninger
2009-02-08 18:35   ` Robert Hancock
2009-02-03 16:46 ` [PATCH 5/7] CPUFREQ: powernow-k8: Always compile powernow-k8 driver with ACPI support Thomas Renninger
2009-02-03 16:46 ` [PATCH 6/7] CPUFREQ: powernow-k8: Only print error message once, not per core Thomas Renninger
2009-02-04  5:09   ` Andrew Morton
2009-02-04  9:59     ` Thomas Renninger
2009-02-03 16:46 ` [PATCH 7/7] ACPI: cpufreq: Remove deprecated /proc/acpi/processor/../performance proc entries Thomas Renninger
2009-02-04  5:13   ` Len Brown
2009-02-03 16:48 ` CPUFREQ: Ondemand and powernow-k8 enhancements/fixes/cleanups Dave Jones
2009-02-03 21:21 ` Dave Jones
2009-02-03 23:29   ` Thomas Renninger
2009-02-03 23:44     ` Dave Jones

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=1233679606-1971-3-git-send-email-trenn@suse.de \
    --to=trenn@suse.de \
    --cc=cpufreq@vger.kernel.org \
    --cc=davej@codemonkey.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.langsdorf@amd.com \
    --cc=venkatesh.pallipadi@intel.com \
    /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

all inboxes | Powered by JetHome®