Export deferrable timer through workqueue and use it in ondemand governor
Subsystems (2)
PATCH 2/2 Export deferrable timer through workqueue and use it in ondemand governor
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.
drivers/cpufreq/cpufreq_ondemand.c +1 -1
@@ -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); }
include/linux/workqueue.h +6 -0
@@ -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)); \
Quoted 9 lines · Venkatesh Pallipadi
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 <[email protected]>
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
Signature · 1 line
http://www.codemonkey.org.uk
Quoted 7 lines · Dave Jones
Quoted 6 lines · Venkatesh Pallipadi
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.
Quoted 8 lines
Quoted 3 lines
Use this init in cpufreq ondemand governor.
Signed-off-by Venkatesh Pallipadi <[email protected]>
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
Quoted 5 lines · Venki Pallipadi
init_timer_deferrableis defined in
[PATCH 1/2] Add support for deferrable timers
http://www.ussg.iu.edu/hypermail/linux/kernel/0703.2/2064.htmlDo you get this error after that patch?
Ah, looks like I had 1/2 from the previous iteration of this patch.
Dave
Signature · 1 line
http://www.codemonkey.org.uk