LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 2/2] Export deferrable timer through workqueue and use it in ondemand governor
@ 2007-03-21 20:23 Venkatesh Pallipadi
  2007-03-21 22:04 ` Dave Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Venkatesh Pallipadi @ 2007-03-21 20:23 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, Dave Jones, tglx



Add a new deferrable delayed work init. This can be used to schedule work
that are 'unimportant' when CPU is idle and can be called later, when CPU
eventually comes out of idle.

Use this init in cpufreq ondemand governor.
 
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

Index: new/drivers/cpufreq/cpufreq_ondemand.c
===================================================================
--- new.orig/drivers/cpufreq/cpufreq_ondemand.c	2007-03-21 09:16:52.000000000 -0800
+++ new/drivers/cpufreq/cpufreq_ondemand.c	2007-03-21 09:18:08.000000000 -0800
@@ -470,7 +470,7 @@
 	dbs_info->enable = 1;
 	ondemand_powersave_bias_init();
 	dbs_info->sample_type = DBS_NORMAL_SAMPLE;
-	INIT_DELAYED_WORK(&dbs_info->work, do_dbs_timer);
+	INIT_DELAYED_WORK_DEF(&dbs_info->work, do_dbs_timer);
 	queue_delayed_work_on(dbs_info->cpu, kondemand_wq, &dbs_info->work,
 	                      delay);
 }
Index: new/include/linux/workqueue.h
===================================================================
--- new.orig/include/linux/workqueue.h	2007-03-21 09:16:52.000000000 -0800
+++ new/include/linux/workqueue.h	2007-03-21 09:18:08.000000000 -0800
@@ -115,6 +115,12 @@
 		init_timer(&(_work)->timer);			\
 	} while (0)
 
+#define INIT_DELAYED_WORK_DEF(_work, _func)			\
+	do {							\
+		INIT_WORK(&(_work)->work, (_func));		\
+		init_timer_deferrable(&(_work)->timer);		\
+	} while (0)
+
 #define INIT_DELAYED_WORK_NAR(_work, _func)			\
 	do {							\
 		INIT_WORK_NAR(&(_work)->work, (_func));		\

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

* Re: [PATCH 2/2] Export deferrable timer through workqueue and use it in ondemand governor
  2007-03-21 20:23 [PATCH 2/2] Export deferrable timer through workqueue and use it in ondemand governor Venkatesh Pallipadi
@ 2007-03-21 22:04 ` Dave Jones
  2007-03-21 22:19   ` Venki Pallipadi
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Jones @ 2007-03-21 22:04 UTC (permalink / raw)
  To: Venkatesh Pallipadi; +Cc: Andrew Morton, linux-kernel, tglx

On Wed, Mar 21, 2007 at 01:23:40PM -0700, Venkatesh Pallipadi wrote:
 > 
 > 
 > Add a new deferrable delayed work init. This can be used to schedule work
 > that are 'unimportant' when CPU is idle and can be called later, when CPU
 > eventually comes out of idle.
 > 
 > Use this init in cpufreq ondemand governor.
 >  
 > Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

drivers/cpufreq/cpufreq_ondemand.c: In function 'dbs_timer_init':
drivers/cpufreq/cpufreq_ondemand.c:473: error: implicit declaration of function 'init_timer_deferrable'

	Dave

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

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

* Re: [PATCH 2/2] Export deferrable timer through workqueue and use it in ondemand governor
  2007-03-21 22:04 ` Dave Jones
@ 2007-03-21 22:19   ` Venki Pallipadi
  2007-03-21 22:29     ` Dave Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Venki Pallipadi @ 2007-03-21 22:19 UTC (permalink / raw)
  To: Dave Jones; +Cc: Andrew Morton, linux-kernel, tglx



On Mar 21, 2007, at 3:04 PM, Dave Jones wrote:

> On Wed, Mar 21, 2007 at 01:23:40PM -0700, Venkatesh Pallipadi wrote:
>>
>>
>> Add a new deferrable delayed work init. This can be used to  
>> schedule work
>> that are 'unimportant' when CPU is idle and can be called later,  
>> when CPU
>> eventually comes out of idle.
>>
>> Use this init in cpufreq ondemand governor.
>>
>> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
>
> drivers/cpufreq/cpufreq_ondemand.c: In function 'dbs_timer_init':
> drivers/cpufreq/cpufreq_ondemand.c:473: error: implicit declaration  
> of function 'init_timer_deferrable'
>
>


init_timer_deferrable is defined in
[PATCH 1/2] Add support for deferrable timers
http://www.ussg.iu.edu/hypermail/linux/kernel/0703.2/2064.html

Do you get this error after that patch?

Thanks,
~Venki

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

* Re: [PATCH 2/2] Export deferrable timer through workqueue and use it in ondemand governor
  2007-03-21 22:19   ` Venki Pallipadi
@ 2007-03-21 22:29     ` Dave Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Jones @ 2007-03-21 22:29 UTC (permalink / raw)
  To: Venki Pallipadi; +Cc: Andrew Morton, linux-kernel, tglx

On Wed, Mar 21, 2007 at 03:19:45PM -0700, Venki Pallipadi wrote:

 > init_timer_deferrable is defined in
 > [PATCH 1/2] Add support for deferrable timers
 > http://www.ussg.iu.edu/hypermail/linux/kernel/0703.2/2064.html
 > 
 > Do you get this error after that patch?

Ah, looks like I had 1/2 from the previous iteration of this patch.

	Dave

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

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

end of thread, other threads:[~2007-03-21 23:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-21 20:23 [PATCH 2/2] Export deferrable timer through workqueue and use it in ondemand governor Venkatesh Pallipadi
2007-03-21 22:04 ` Dave Jones
2007-03-21 22:19   ` Venki Pallipadi
2007-03-21 22:29     ` Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).