* RE: [PATCH 4/4] minor optimizations to ondemand governor
@ 2006-06-30 7:33 Brown, Len
2006-06-30 19:11 ` Dominik Brodowski
0 siblings, 1 reply; 6+ messages in thread
From: Brown, Len @ 2006-06-30 7:33 UTC (permalink / raw)
To: Dave Jones, Pallipadi, Venkatesh; +Cc: Starikovskiy, Alexey Y, cpufreq
>Longer term, I'd really like to see conservative & ondemand
>sharing more code as a separate helper .o file. They're similar
>in so many ways, it seems silly to duplicate so much code.
What value does cpufreq_conservative.c add over ondemand?
Are there some workloads we can measure to prove that
cpufreq_conservative.c should, or should-not exist?
-Len
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] minor optimizations to ondemand governor
2006-06-30 7:33 [PATCH 4/4] minor optimizations to ondemand governor Brown, Len
@ 2006-06-30 19:11 ` Dominik Brodowski
2006-06-30 20:00 ` Rafał Bilski
0 siblings, 1 reply; 6+ messages in thread
From: Dominik Brodowski @ 2006-06-30 19:11 UTC (permalink / raw)
To: Brown, Len; +Cc: Starikovskiy, Alexey Y, Dave Jones, cpufreq
On Fri, Jun 30, 2006 at 03:33:39AM -0400, Brown, Len wrote:
>
> >Longer term, I'd really like to see conservative & ondemand
> >sharing more code as a separate helper .o file. They're similar
> >in so many ways, it seems silly to duplicate so much code.
>
> What value does cpufreq_conservative.c add over ondemand?
>
> Are there some workloads we can measure to prove that
> cpufreq_conservative.c should, or should-not exist?
IIRC it's less a matter of workload than of which CPU you have -- not all
do support fast jumps to the highest frequency? Or do they now?
Dominik
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] minor optimizations to ondemand governor
2006-06-30 19:11 ` Dominik Brodowski
@ 2006-06-30 20:00 ` Rafał Bilski
0 siblings, 0 replies; 6+ messages in thread
From: Rafał Bilski @ 2006-06-30 20:00 UTC (permalink / raw)
To: cpufreq
Dominik Brodowski napisa³(a):
> On Fri, Jun 30, 2006 at 03:33:39AM -0400, Brown, Len wrote:
>>
>>> Longer term, I'd really like to see conservative & ondemand
>>> sharing more code as a separate helper .o file. They're similar
>>> in so many ways, it seems silly to duplicate so much code.
>> What value does cpufreq_conservative.c add over ondemand?
>>
>> Are there some workloads we can measure to prove that
>> cpufreq_conservative.c should, or should-not exist?
>
> IIRC it's less a matter of workload than of which CPU you have -- not all
> do support fast jumps to the highest frequency? Or do they now?
>
> Dominik
Not all users want governor reaction on glitches in CPU usage.
Rafa³
------------------------------------------------------------------------
Interaktywne mapy miast na http://map24.interia.pl
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 4/4] minor optimizations to ondemand governor
@ 2006-06-28 20:52 Venkatesh Pallipadi
2006-06-30 5:37 ` Dave Jones
0 siblings, 1 reply; 6+ messages in thread
From: Venkatesh Pallipadi @ 2006-06-28 20:52 UTC (permalink / raw)
To: cpufreq; +Cc: alexey.y.starikovskiy, Dave Jones, Len Brown
ondemand_misc_cleanups_06.patch
Misc cleanups in ondemand. Should have zero functional impact.
Also adding Alexey as author.
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Index: linux-2.6.17/drivers/cpufreq/cpufreq_ondemand.c
===================================================================
--- linux-2.6.17.orig/drivers/cpufreq/cpufreq_ondemand.c
+++ linux-2.6.17/drivers/cpufreq/cpufreq_ondemand.c
@@ -17,23 +17,11 @@
#include <linux/kernel.h>
#include <linux/module.h>
-#include <linux/smp.h>
#include <linux/init.h>
-#include <linux/interrupt.h>
-#include <linux/ctype.h>
#include <linux/cpu.h>
#include <linux/cpufreq.h>
-#include <linux/sysctl.h>
-#include <linux/types.h>
-#include <linux/fs.h>
-#include <linux/sysfs.h>
-#include <linux/sched.h>
-#include <linux/kmod.h>
-#include <linux/workqueue.h>
#include <linux/jiffies.h>
#include <linux/kernel_stat.h>
-#include <linux/percpu.h>
-#include <linux/mutex.h>
/*
* dbs is used in this file as a shortform for demandbased switching
@@ -84,8 +72,7 @@ static unsigned int dbs_enable; /* numbe
* cpu_hotplug lock should be taken before that. Note that cpu_hotplug lock
* is recursive for the same process. -Venki
*/
-static DEFINE_MUTEX (dbs_mutex);
-static DECLARE_WORK (dbs_work, do_dbs_timer, NULL);
+static DEFINE_MUTEX(dbs_mutex);
static struct workqueue_struct *kondemand_wq;
@@ -147,7 +134,7 @@ static ssize_t store_sampling_rate(struc
{
unsigned int input;
int ret;
- ret = sscanf (buf, "%u", &input);
+ ret = sscanf(buf, "%u", &input);
mutex_lock(&dbs_mutex);
if (ret != 1 || input > MAX_SAMPLING_RATE || input < MIN_SAMPLING_RATE) {
@@ -166,7 +153,7 @@ static ssize_t store_up_threshold(struct
{
unsigned int input;
int ret;
- ret = sscanf (buf, "%u", &input);
+ ret = sscanf(buf, "%u", &input);
mutex_lock(&dbs_mutex);
if (ret != 1 || input > MAX_FREQUENCY_UP_THRESHOLD ||
@@ -189,7 +176,7 @@ static ssize_t store_ignore_nice_load(st
unsigned int j;
- ret = sscanf (buf, "%u", &input);
+ ret = sscanf(buf, "%u", &input);
if ( ret != 1 )
return -EINVAL;
@@ -354,8 +341,7 @@ static int cpufreq_governor_dbs(struct c
switch (event) {
case CPUFREQ_GOV_START:
- if ((!cpu_online(cpu)) ||
- (!policy->cur))
+ if ((!cpu_online(cpu)) || (!policy->cur))
return -EINVAL;
if (policy->cpuinfo.transition_latency >
@@ -429,13 +415,13 @@ static int cpufreq_governor_dbs(struct c
lock_cpu_hotplug();
mutex_lock(&dbs_mutex);
if (policy->max < this_dbs_info->cur_policy->cur)
- __cpufreq_driver_target(
- this_dbs_info->cur_policy,
- policy->max, CPUFREQ_RELATION_H);
+ __cpufreq_driver_target(this_dbs_info->cur_policy,
+ policy->max,
+ CPUFREQ_RELATION_H);
else if (policy->min > this_dbs_info->cur_policy->cur)
- __cpufreq_driver_target(
- this_dbs_info->cur_policy,
- policy->min, CPUFREQ_RELATION_L);
+ __cpufreq_driver_target(this_dbs_info->cur_policy,
+ policy->min,
+ CPUFREQ_RELATION_L);
mutex_unlock(&dbs_mutex);
unlock_cpu_hotplug();
break;
@@ -444,9 +430,9 @@ static int cpufreq_governor_dbs(struct c
}
static struct cpufreq_governor cpufreq_gov_dbs = {
- .name = "ondemand",
- .governor = cpufreq_governor_dbs,
- .owner = THIS_MODULE,
+ .name = "ondemand",
+ .governor = cpufreq_governor_dbs,
+ .owner = THIS_MODULE,
};
static int __init cpufreq_gov_dbs_init(void)
@@ -460,10 +446,11 @@ static void __exit cpufreq_gov_dbs_exit(
}
-MODULE_AUTHOR ("Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>");
-MODULE_DESCRIPTION ("'cpufreq_ondemand' - A dynamic cpufreq governor for "
- "Low Latency Frequency Transition capable processors");
-MODULE_LICENSE ("GPL");
+MODULE_AUTHOR("Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>");
+MODULE_AUTHOR("Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>");
+MODULE_DESCRIPTION("'cpufreq_ondemand' - A dynamic cpufreq governor for "
+ "Low Latency Frequency Transition capable processors");
+MODULE_LICENSE("GPL");
module_init(cpufreq_gov_dbs_init);
module_exit(cpufreq_gov_dbs_exit);
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH 4/4] minor optimizations to ondemand governor
2006-06-28 20:52 Venkatesh Pallipadi
@ 2006-06-30 5:37 ` Dave Jones
2006-06-30 5:47 ` Dave Jones
0 siblings, 1 reply; 6+ messages in thread
From: Dave Jones @ 2006-06-30 5:37 UTC (permalink / raw)
To: Venkatesh Pallipadi; +Cc: alexey.y.starikovskiy, cpufreq, Len Brown
On Wed, Jun 28, 2006 at 01:52:18PM -0700, Venkatesh Pallipadi wrote:
> Index: linux-2.6.17/drivers/cpufreq/cpufreq_ondemand.c
> ===================================================================
> --- linux-2.6.17.orig/drivers/cpufreq/cpufreq_ondemand.c
> +++ linux-2.6.17/drivers/cpufreq/cpufreq_ondemand.c
> @@ -17,23 +17,11 @@
>
> #include <linux/kernel.h>
> #include <linux/module.h>
> -#include <linux/smp.h>
> #include <linux/init.h>
> -#include <linux/interrupt.h>
> -#include <linux/ctype.h>
> #include <linux/cpu.h>
> #include <linux/cpufreq.h>
> -#include <linux/sysctl.h>
> -#include <linux/types.h>
> -#include <linux/fs.h>
> -#include <linux/sysfs.h>
> -#include <linux/sched.h>
> -#include <linux/kmod.h>
> -#include <linux/workqueue.h>
> #include <linux/jiffies.h>
> #include <linux/kernel_stat.h>
> -#include <linux/percpu.h>
> -#include <linux/mutex.h>
This gave me rejects against Linus tree for some reason.
It's wrong anyway, as this file uses mutex's, and I'd rather
not have to rely on us pulling in mutex.h indirectly through
some other include file chain.
I fixed it up by hand.
Dave
--
http://www.codemonkey.org.uk
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] minor optimizations to ondemand governor
2006-06-30 5:37 ` Dave Jones
@ 2006-06-30 5:47 ` Dave Jones
0 siblings, 0 replies; 6+ messages in thread
From: Dave Jones @ 2006-06-30 5:47 UTC (permalink / raw)
To: Venkatesh Pallipadi; +Cc: alexey.y.starikovskiy, cpufreq, Len Brown
On Fri, Jun 30, 2006 at 01:37:53AM -0400, Dave Jones wrote:
> This gave me rejects against Linus tree for some reason.
> It's wrong anyway, as this file uses mutex's, and I'd rather
> not have to rely on us pulling in mutex.h indirectly through
> some other include file chain.
>
> I fixed it up by hand.
One downside of this patch btw, is that it now increases the
delta between ondemand and conservative a little, which makes
applying the same patch to both a bit more painful.
Care to do a resync sometime ?
Longer term, I'd really like to see conservative & ondemand
sharing more code as a separate helper .o file. They're similar
in so many ways, it seems silly to duplicate so much code.
Dave
--
http://www.codemonkey.org.uk
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-06-30 20:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-30 7:33 [PATCH 4/4] minor optimizations to ondemand governor Brown, Len
2006-06-30 19:11 ` Dominik Brodowski
2006-06-30 20:00 ` Rafał Bilski
-- strict thread matches above, loose matches on Subject: below --
2006-06-28 20:52 Venkatesh Pallipadi
2006-06-30 5:37 ` Dave Jones
2006-06-30 5:47 ` Dave Jones
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.