linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] workqueue: define mod_scheduled_delayed_work[_on]() helpers
@ 2013-02-27 11:29 Viresh Kumar
  2013-02-27 11:29 ` [PATCH 2/3] cpufreq: ondemand: Don't update sample_type if we don't evaluate load again Viresh Kumar
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Viresh Kumar @ 2013-02-27 11:29 UTC (permalink / raw)
  To: rjw
  Cc: cpufreq, linux-pm, linux-kernel, linaro-kernel, robin.randhawa,
	Steve.Bannister, Liviu.Dudau, charles.garcia-tobin,
	rickard.andersson, fabio.baltieri, Viresh Kumar, Tejun Heo

The only difference between schedule_delayed_work[_on]() and
queue_delayed_work[_on]() is the workqueue, work is scheduled on. We may need to
modify the delay for works queued with schedule_delayed_work[_on]() calls and
thus adding these helpers.

First users of these new helpers is cpufreq governors which need to modify the
delay for its works.

Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 include/linux/workqueue.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 2b58905..864c2b3 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -412,6 +412,7 @@ extern bool schedule_delayed_work_on(int cpu, struct delayed_work *work,
 extern bool schedule_delayed_work(struct delayed_work *work,
 				  unsigned long delay);
 extern int schedule_on_each_cpu(work_func_t func);
+
 extern int keventd_up(void);
 
 int execute_in_process_context(work_func_t fn, struct execute_work *);
@@ -465,6 +466,11 @@ static inline long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg)
 long work_on_cpu(unsigned int cpu, long (*fn)(void *), void *arg);
 #endif /* CONFIG_SMP */
 
+#define mod_scheduled_delayed_work_on(cpu, dwork, delay)	\
+	mod_delayed_work_on(cpu, system_wq, dwork, delay)
+#define mod_scheduled_delayed_work(dwork, delay)		\
+	mod_delayed_work(system_wq, dwork, delay)
+
 #ifdef CONFIG_FREEZER
 extern void freeze_workqueues_begin(void);
 extern bool freeze_workqueues_busy(void);
-- 
1.7.12.rc2.18.g61b472e



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

end of thread, other threads:[~2013-03-12  0:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-27 11:29 [PATCH 1/3] workqueue: define mod_scheduled_delayed_work[_on]() helpers Viresh Kumar
2013-02-27 11:29 ` [PATCH 2/3] cpufreq: ondemand: Don't update sample_type if we don't evaluate load again Viresh Kumar
2013-02-27 11:29 ` [PATCH 3/3] cpufreq: governors: Avoid unnecessary per cpu timer interrupts Viresh Kumar
2013-02-27 12:20 ` [PATCH 1/3] workqueue: define mod_scheduled_delayed_work[_on]() helpers Viresh Kumar
2013-02-27 15:10 ` Tejun Heo
2013-02-27 15:14   ` Viresh Kumar
2013-02-27 15:29     ` Tejun Heo
2013-03-11 23:28 ` Rafael J. Wysocki
2013-03-12  0:54   ` Viresh Kumar

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).