All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ondemand: updated tune for hardware coordination
@ 2006-07-26 15:31 Alexey Starikovskiy
  0 siblings, 0 replies; 6+ messages in thread
From: Alexey Starikovskiy @ 2006-07-26 15:31 UTC (permalink / raw)
  To: cpufreq


 cpufreq_ondemand.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

Try to make dbs_check_cpu() call on all CPUs at the same jiffy.
This will help when multiple cores share P-states via Hardware Coordination.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi at intel.com>
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy at intel.com>

Index: linux-2.6.15.1/drivers/cpufreq/cpufreq_ondemand.c
===================================================================
--- linux-2.6.15.1.orig/drivers/cpufreq/cpufreq_ondemand.c	2006-07-26 15:58:58.000000000 +0400
+++ linux-2.6.15.1/drivers/cpufreq/cpufreq_ondemand.c	2006-07-26 17:38:43.000000000 +0400
@@ -305,23 +305,26 @@
 {
 	unsigned int cpu = smp_processor_id();
 	struct cpu_dbs_info_s *dbs_info = &per_cpu(cpu_dbs_info, cpu);
+	/* We want all CPUs to do sampling nearly on same jiffy */
+	int delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate);
+	delay -= jiffies % delay;
 
 	if (!dbs_info->enable)
 		return;
 
 	dbs_check_cpu(dbs_info);
-	queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work,
-			usecs_to_jiffies(dbs_tuners_ins.sampling_rate));
+	queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work, delay);
 }
 
 static inline void dbs_timer_init(unsigned int cpu)
 {
 	struct cpu_dbs_info_s *dbs_info = &per_cpu(cpu_dbs_info, cpu);
+	/* We want all CPUs to do sampling nearly on same jiffy */
+	int delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate);
+	delay -= jiffies % delay;
 
 	INIT_WORK(&dbs_info->work, do_dbs_timer, 0);
-	queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work,
-			usecs_to_jiffies(dbs_tuners_ins.sampling_rate));
-	return;
+	queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work, delay);
 }
 
 static inline void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] ondemand: updated tune for hardware coordination
@ 2006-07-31 18:25 Alexey Starikovskiy
  2006-07-31 22:37 ` Dave Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Starikovskiy @ 2006-07-31 18:25 UTC (permalink / raw)
  To: Brown, Len, Dave Jones; +Cc: cpufreq


 cpufreq_ondemand.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

Try to make dbs_check_cpu() call on all CPUs at the same jiffy.
This will help when multiple cores share P-states via Hardware Coordination.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi at intel.com>
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy at intel.com>

Index: linux-2.6.15.1/drivers/cpufreq/cpufreq_ondemand.c
===================================================================
--- linux-2.6.15.1.orig/drivers/cpufreq/cpufreq_ondemand.c	2006-07-31 21:43:55.000000000 +0400
+++ linux-2.6.15.1/drivers/cpufreq/cpufreq_ondemand.c	2006-07-31 21:51:37.000000000 +0400
@@ -305,6 +305,9 @@
 {
 	unsigned int cpu = smp_processor_id();
 	struct cpu_dbs_info_s *dbs_info = &per_cpu(cpu_dbs_info, cpu);
+	/* We want all CPUs to do sampling nearly on same jiffy */
+	int delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate);
+	delay -= jiffies % delay;
 
 	if (!dbs_info->enable)
 		return;
@@ -312,18 +315,18 @@
 	lock_cpu_hotplug();
 	dbs_check_cpu(dbs_info);
 	unlock_cpu_hotplug();
-	queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work,
-			usecs_to_jiffies(dbs_tuners_ins.sampling_rate));
+	queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work, delay);
 }
 
 static inline void dbs_timer_init(unsigned int cpu)
 {
 	struct cpu_dbs_info_s *dbs_info = &per_cpu(cpu_dbs_info, cpu);
+	/* We want all CPUs to do sampling nearly on same jiffy */
+	int delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate);
+	delay -= jiffies % delay;
 
 	INIT_WORK(&dbs_info->work, do_dbs_timer, 0);
-	queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work,
-			usecs_to_jiffies(dbs_tuners_ins.sampling_rate));
-	return;
+	queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work, delay);
 }
 
 static inline void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] ondemand: updated tune for hardware coordination
  2006-07-31 18:25 Alexey Starikovskiy
@ 2006-07-31 22:37 ` Dave Jones
  2006-08-01  8:09   ` Alexey Starikovskiy
  0 siblings, 1 reply; 6+ messages in thread
From: Dave Jones @ 2006-07-31 22:37 UTC (permalink / raw)
  To: Alexey Starikovskiy; +Cc: cpufreq

On Mon, Jul 31, 2006 at 10:25:20PM +0400, Alexey Starikovskiy wrote:
 > 
 > cpufreq_ondemand.c |   13 ++++++++-----
 > 1 file changed, 8 insertions(+), 5 deletions(-)
 > 
 > Try to make dbs_check_cpu() call on all CPUs at the same jiffy.
 > This will help when multiple cores share P-states via Hardware Coordination.
 > 
 > Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi at intel.com>
 > Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy at intel.com>

Still doesn't apply..

error: patch failed: drivers/cpufreq/cpufreq_ondemand.c:303
error: drivers/cpufreq/cpufreq_ondemand.c: patch does not apply


 > Index: linux-2.6.15.1/drivers/cpufreq/cpufreq_ondemand.c
                ^^^^^^^^
Hmmm?

		Dave

-- 
http://www.codemonkey.org.uk

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] ondemand: updated tune for hardware coordination
  2006-07-31 22:37 ` Dave Jones
@ 2006-08-01  8:09   ` Alexey Starikovskiy
  2006-08-01 16:43     ` Dave Jones
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Starikovskiy @ 2006-08-01  8:09 UTC (permalink / raw)
  To: Dave Jones; +Cc: cpufreq

Dave Jones wrote:
> On Mon, Jul 31, 2006 at 10:25:20PM +0400, Alexey Starikovskiy wrote:
>  > 
>  > cpufreq_ondemand.c |   13 ++++++++-----
>  > 1 file changed, 8 insertions(+), 5 deletions(-)
>  > 
>  > Try to make dbs_check_cpu() call on all CPUs at the same jiffy.
>  > This will help when multiple cores share P-states via Hardware Coordination.
>  > 
>  > Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi at intel.com>
>  > Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy at intel.com>
> 
> Still doesn't apply..
> 
> error: patch failed: drivers/cpufreq/cpufreq_ondemand.c:303
> error: drivers/cpufreq/cpufreq_ondemand.c: patch does not apply
It requires Arjan's patch to cpufreq, sitting in Linus tree for 3 days already.
> 
> 
>  > Index: linux-2.6.15.1/drivers/cpufreq/cpufreq_ondemand.c
>                 ^^^^^^^^
> Hmmm?
Read it as 2.6.18-rc3...
> 
> 		Dave
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] ondemand: updated tune for hardware coordination
  2006-08-01  8:09   ` Alexey Starikovskiy
@ 2006-08-01 16:43     ` Dave Jones
  2006-08-01 17:39       ` Alexey Starikovskiy
  0 siblings, 1 reply; 6+ messages in thread
From: Dave Jones @ 2006-08-01 16:43 UTC (permalink / raw)
  To: Alexey Starikovskiy; +Cc: cpufreq

On Tue, Aug 01, 2006 at 12:09:50PM +0400, Alexey Starikovskiy wrote:
 > Dave Jones wrote:
 > > On Mon, Jul 31, 2006 at 10:25:20PM +0400, Alexey Starikovskiy wrote:
 > >  > 
 > >  > cpufreq_ondemand.c |   13 ++++++++-----
 > >  > 1 file changed, 8 insertions(+), 5 deletions(-)
 > >  > 
 > >  > Try to make dbs_check_cpu() call on all CPUs at the same jiffy.
 > >  > This will help when multiple cores share P-states via Hardware Coordination.
 > >  > 
 > >  > Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi at intel.com>
 > >  > Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy at intel.com>
 > > 
 > > Still doesn't apply..
 > > 
 > > error: patch failed: drivers/cpufreq/cpufreq_ondemand.c:303
 > > error: drivers/cpufreq/cpufreq_ondemand.c: patch does not apply
 > It requires Arjan's patch to cpufreq, sitting in Linus tree for 3 days already.

This was after I'd rebased the cpufreq.git tree to Linus' latest yesterday.

		Dave

-- 
http://www.codemonkey.org.uk

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] ondemand: updated tune for hardware coordination
  2006-08-01 16:43     ` Dave Jones
@ 2006-08-01 17:39       ` Alexey Starikovskiy
  0 siblings, 0 replies; 6+ messages in thread
From: Alexey Starikovskiy @ 2006-08-01 17:39 UTC (permalink / raw)
  To: Dave Jones; +Cc: cpufreq

Dave Jones wrote:
> On Tue, Aug 01, 2006 at 12:09:50PM +0400, Alexey Starikovskiy wrote:
>  > Dave Jones wrote:
>  > > On Mon, Jul 31, 2006 at 10:25:20PM +0400, Alexey Starikovskiy wrote:
>  > >  > 
>  > >  > cpufreq_ondemand.c |   13 ++++++++-----
>  > >  > 1 file changed, 8 insertions(+), 5 deletions(-)
>  > >  > 
>  > >  > Try to make dbs_check_cpu() call on all CPUs at the same jiffy.
>  > >  > This will help when multiple cores share P-states via Hardware Coordination.
>  > >  > 
>  > >  > Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi at intel.com>
>  > >  > Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy at intel.com>
>  > > 
>  > > Still doesn't apply..
>  > > 
>  > > error: patch failed: drivers/cpufreq/cpufreq_ondemand.c:303
>  > > error: drivers/cpufreq/cpufreq_ondemand.c: patch does not apply
>  > It requires Arjan's patch to cpufreq, sitting in Linus tree for 3 days already.
> 
> This was after I'd rebased the cpufreq.git tree to Linus' latest yesterday.
> 
> 		Dave
> 
Just checked once again. Version I've sent yesterday cleanly applies to your
just updated cpufreq.git tree.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-08-01 17:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-26 15:31 [PATCH 1/2] ondemand: updated tune for hardware coordination Alexey Starikovskiy
  -- strict thread matches above, loose matches on Subject: below --
2006-07-31 18:25 Alexey Starikovskiy
2006-07-31 22:37 ` Dave Jones
2006-08-01  8:09   ` Alexey Starikovskiy
2006-08-01 16:43     ` Dave Jones
2006-08-01 17:39       ` Alexey Starikovskiy

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.