[CPUFREQ] ondemand/conservative: deprecate sampling_rate{min,max}
The same info can be obtained via the transition_latency sysfs file Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Dave Jones <davej@redhat.com>
This commit is contained in:
committed by
Dave Jones
parent
57f4fa6991
commit
9411b4ef7f
@@ -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
|
what to do about the frequency. Typically this is set to values of
|
||||||
around '10000' or more.
|
around '10000' or more.
|
||||||
|
|
||||||
show_sampling_rate_(min|max): the minimum and maximum sampling rates
|
show_sampling_rate_(min|max): THIS INTERFACE IS DEPRECATED, DON'T USE IT.
|
||||||
available that you may set 'sampling_rate' to.
|
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
|
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
|
of 'sampling_rate' needs to be for the kernel to make a decision on
|
||||||
|
@@ -140,11 +140,26 @@ static struct notifier_block dbs_cpufreq_notifier_block = {
|
|||||||
/************************** sysfs interface ************************/
|
/************************** sysfs interface ************************/
|
||||||
static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf)
|
static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf)
|
||||||
{
|
{
|
||||||
|
static int print_once;
|
||||||
|
|
||||||
|
if (!print_once) {
|
||||||
|
printk(KERN_INFO "CPUFREQ: conservative sampling_rate_max "
|
||||||
|
"sysfs file is deprecated - used by: %s\n",
|
||||||
|
current->comm);
|
||||||
|
print_once = 1;
|
||||||
|
}
|
||||||
return sprintf(buf, "%u\n", MAX_SAMPLING_RATE);
|
return sprintf(buf, "%u\n", MAX_SAMPLING_RATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf)
|
static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf)
|
||||||
{
|
{
|
||||||
|
static int print_once;
|
||||||
|
|
||||||
|
if (!print_once) {
|
||||||
|
printk(KERN_INFO "CPUFREQ: conservative sampling_rate_max "
|
||||||
|
"sysfs file is deprecated - used by: %s\n", current->comm);
|
||||||
|
print_once = 1;
|
||||||
|
}
|
||||||
return sprintf(buf, "%u\n", MIN_SAMPLING_RATE);
|
return sprintf(buf, "%u\n", MIN_SAMPLING_RATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -21,6 +21,7 @@
|
|||||||
#include <linux/hrtimer.h>
|
#include <linux/hrtimer.h>
|
||||||
#include <linux/tick.h>
|
#include <linux/tick.h>
|
||||||
#include <linux/ktime.h>
|
#include <linux/ktime.h>
|
||||||
|
#include <linux/sched.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* dbs is used in this file as a shortform for demandbased switching
|
* dbs is used in this file as a shortform for demandbased switching
|
||||||
@@ -203,11 +204,27 @@ static void ondemand_powersave_bias_init(void)
|
|||||||
/************************** sysfs interface ************************/
|
/************************** sysfs interface ************************/
|
||||||
static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf)
|
static ssize_t show_sampling_rate_max(struct cpufreq_policy *policy, char *buf)
|
||||||
{
|
{
|
||||||
|
static int print_once;
|
||||||
|
|
||||||
|
if (!print_once) {
|
||||||
|
printk(KERN_INFO "CPUFREQ: ondemand sampling_rate_max "
|
||||||
|
"sysfs file is deprecated - used by: %s\n",
|
||||||
|
current->comm);
|
||||||
|
print_once = 1;
|
||||||
|
}
|
||||||
return sprintf(buf, "%u\n", MAX_SAMPLING_RATE);
|
return sprintf(buf, "%u\n", MAX_SAMPLING_RATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf)
|
static ssize_t show_sampling_rate_min(struct cpufreq_policy *policy, char *buf)
|
||||||
{
|
{
|
||||||
|
static int print_once;
|
||||||
|
|
||||||
|
if (!print_once) {
|
||||||
|
printk(KERN_INFO "CPUFREQ: ondemand sampling_rate_min "
|
||||||
|
"sysfs file is deprecated - used by: %s\n",
|
||||||
|
current->comm);
|
||||||
|
print_once = 1;
|
||||||
|
}
|
||||||
return sprintf(buf, "%u\n", MIN_SAMPLING_RATE);
|
return sprintf(buf, "%u\n", MIN_SAMPLING_RATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user