* [PATCH 02/32] powerpc/cell: use system_wq in cpufreq_spudemand
[not found] <1294062595-30097-1-git-send-email-tj@kernel.org>
@ 2011-01-03 13:49 ` Tejun Heo
2011-01-03 13:49 ` [PATCH 07/32] cpufreq: use system_wq instead of dedicated workqueues Tejun Heo
2011-01-25 14:29 ` [PATCHSET] workqueue: update workqueue users - replace create_workqueue() Tejun Heo
2 siblings, 0 replies; 7+ messages in thread
From: Tejun Heo @ 2011-01-03 13:49 UTC (permalink / raw)
To: linux-kernel; +Cc: Tejun Heo, Dave Jones, linuxppc-dev, cpufreq, Arnd Bergmann
With cmwq, there's no reason to use a separate workqueue in
cpufreq_spudemand. Use system_wq instead. The work items are already
sync canceled on stop, so it's already guaranteed that no work is
running when spu_gov_exit() is entered.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Dave Jones <davej@redhat.com>
Cc: cpufreq@vger.kernel.org
---
Only compile tested. Please feel free to take it into the subsystem
tree or simply ack - I'll route it through the wq tree.
Thanks.
arch/powerpc/platforms/cell/cpufreq_spudemand.c | 20 +++-----------------
1 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/arch/powerpc/platforms/cell/cpufreq_spudemand.c b/arch/powerpc/platforms/cell/cpufreq_spudemand.c
index 968c1c0..d809836 100644
--- a/arch/powerpc/platforms/cell/cpufreq_spudemand.c
+++ b/arch/powerpc/platforms/cell/cpufreq_spudemand.c
@@ -39,8 +39,6 @@ struct spu_gov_info_struct {
};
static DEFINE_PER_CPU(struct spu_gov_info_struct, spu_gov_info);
-static struct workqueue_struct *kspugov_wq;
-
static int calc_freq(struct spu_gov_info_struct *info)
{
int cpu;
@@ -71,14 +69,14 @@ static void spu_gov_work(struct work_struct *work)
__cpufreq_driver_target(info->policy, target_freq, CPUFREQ_RELATION_H);
delay = usecs_to_jiffies(info->poll_int);
- queue_delayed_work_on(info->policy->cpu, kspugov_wq, &info->work, delay);
+ schedule_delayed_work_on(info->policy->cpu, &info->work, delay);
}
static void spu_gov_init_work(struct spu_gov_info_struct *info)
{
int delay = usecs_to_jiffies(info->poll_int);
INIT_DELAYED_WORK_DEFERRABLE(&info->work, spu_gov_work);
- queue_delayed_work_on(info->policy->cpu, kspugov_wq, &info->work, delay);
+ schedule_delayed_work_on(info->policy->cpu, &info->work, delay);
}
static void spu_gov_cancel_work(struct spu_gov_info_struct *info)
@@ -152,27 +150,15 @@ static int __init spu_gov_init(void)
{
int ret;
- kspugov_wq = create_workqueue("kspugov");
- if (!kspugov_wq) {
- printk(KERN_ERR "creation of kspugov failed\n");
- ret = -EFAULT;
- goto out;
- }
-
ret = cpufreq_register_governor(&spu_governor);
- if (ret) {
+ if (ret)
printk(KERN_ERR "registration of governor failed\n");
- destroy_workqueue(kspugov_wq);
- goto out;
- }
-out:
return ret;
}
static void __exit spu_gov_exit(void)
{
cpufreq_unregister_governor(&spu_governor);
- destroy_workqueue(kspugov_wq);
}
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 07/32] cpufreq: use system_wq instead of dedicated workqueues
[not found] <1294062595-30097-1-git-send-email-tj@kernel.org>
2011-01-03 13:49 ` [PATCH 02/32] powerpc/cell: use system_wq in cpufreq_spudemand Tejun Heo
@ 2011-01-03 13:49 ` Tejun Heo
2011-01-25 14:29 ` [PATCHSET] workqueue: update workqueue users - replace create_workqueue() Tejun Heo
2 siblings, 0 replies; 7+ messages in thread
From: Tejun Heo @ 2011-01-03 13:49 UTC (permalink / raw)
To: linux-kernel; +Cc: Tejun Heo, Dave Jones, cpufreq
With cmwq, there's no reason for cpufreq drivers to use separate
workqueues. Remove the dedicated workqueues from cpufreq_conservative
and cpufreq_ondemand and use system_wq instead. The work items are
already sync canceled on stop, so it's already guaranteed that no work
is running on module exit.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Dave Jones <davej@redhat.com>
Cc: cpufreq@vger.kernel.org
---
Only compile tested. Please feel free to take it into the subsystem
tree or simply ack - I'll route it through the wq tree.
Thanks.
drivers/cpufreq/cpufreq_conservative.c | 22 +++-------------------
drivers/cpufreq/cpufreq_ondemand.c | 20 +++-----------------
2 files changed, 6 insertions(+), 36 deletions(-)
diff --git a/drivers/cpufreq/cpufreq_conservative.c b/drivers/cpufreq/cpufreq_conservative.c
index 526bfbf..94284c8 100644
--- a/drivers/cpufreq/cpufreq_conservative.c
+++ b/drivers/cpufreq/cpufreq_conservative.c
@@ -81,8 +81,6 @@ static unsigned int dbs_enable; /* number of CPUs using this policy */
*/
static DEFINE_MUTEX(dbs_mutex);
-static struct workqueue_struct *kconservative_wq;
-
static struct dbs_tuners {
unsigned int sampling_rate;
unsigned int sampling_down_factor;
@@ -560,7 +558,7 @@ static void do_dbs_timer(struct work_struct *work)
dbs_check_cpu(dbs_info);
- queue_delayed_work_on(cpu, kconservative_wq, &dbs_info->work, delay);
+ schedule_delayed_work_on(cpu, &dbs_info->work, delay);
mutex_unlock(&dbs_info->timer_mutex);
}
@@ -572,8 +570,7 @@ static inline void dbs_timer_init(struct cpu_dbs_info_s *dbs_info)
dbs_info->enable = 1;
INIT_DELAYED_WORK_DEFERRABLE(&dbs_info->work, do_dbs_timer);
- queue_delayed_work_on(dbs_info->cpu, kconservative_wq, &dbs_info->work,
- delay);
+ schedule_delayed_work_on(dbs_info->cpu, &dbs_info->work, delay);
}
static inline void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info)
@@ -716,25 +713,12 @@ struct cpufreq_governor cpufreq_gov_conservative = {
static int __init cpufreq_gov_dbs_init(void)
{
- int err;
-
- kconservative_wq = create_workqueue("kconservative");
- if (!kconservative_wq) {
- printk(KERN_ERR "Creation of kconservative failed\n");
- return -EFAULT;
- }
-
- err = cpufreq_register_governor(&cpufreq_gov_conservative);
- if (err)
- destroy_workqueue(kconservative_wq);
-
- return err;
+ return cpufreq_register_governor(&cpufreq_gov_conservative);
}
static void __exit cpufreq_gov_dbs_exit(void)
{
cpufreq_unregister_governor(&cpufreq_gov_conservative);
- destroy_workqueue(kconservative_wq);
}
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index c631f27..58aa85e 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -104,8 +104,6 @@ static unsigned int dbs_enable; /* number of CPUs using this policy */
*/
static DEFINE_MUTEX(dbs_mutex);
-static struct workqueue_struct *kondemand_wq;
-
static struct dbs_tuners {
unsigned int sampling_rate;
unsigned int up_threshold;
@@ -667,7 +665,7 @@ static void do_dbs_timer(struct work_struct *work)
__cpufreq_driver_target(dbs_info->cur_policy,
dbs_info->freq_lo, CPUFREQ_RELATION_H);
}
- queue_delayed_work_on(cpu, kondemand_wq, &dbs_info->work, delay);
+ schedule_delayed_work_on(cpu, &dbs_info->work, delay);
mutex_unlock(&dbs_info->timer_mutex);
}
@@ -681,8 +679,7 @@ static inline void dbs_timer_init(struct cpu_dbs_info_s *dbs_info)
dbs_info->sample_type = DBS_NORMAL_SAMPLE;
INIT_DELAYED_WORK_DEFERRABLE(&dbs_info->work, do_dbs_timer);
- queue_delayed_work_on(dbs_info->cpu, kondemand_wq, &dbs_info->work,
- delay);
+ schedule_delayed_work_on(dbs_info->cpu, &dbs_info->work, delay);
}
static inline void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info)
@@ -814,7 +811,6 @@ static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
static int __init cpufreq_gov_dbs_init(void)
{
- int err;
cputime64_t wall;
u64 idle_time;
int cpu = get_cpu();
@@ -838,22 +834,12 @@ static int __init cpufreq_gov_dbs_init(void)
MIN_SAMPLING_RATE_RATIO * jiffies_to_usecs(10);
}
- kondemand_wq = create_workqueue("kondemand");
- if (!kondemand_wq) {
- printk(KERN_ERR "Creation of kondemand failed\n");
- return -EFAULT;
- }
- err = cpufreq_register_governor(&cpufreq_gov_ondemand);
- if (err)
- destroy_workqueue(kondemand_wq);
-
- return err;
+ return cpufreq_register_governor(&cpufreq_gov_ondemand);
}
static void __exit cpufreq_gov_dbs_exit(void)
{
cpufreq_unregister_governor(&cpufreq_gov_ondemand);
- destroy_workqueue(kondemand_wq);
}
--
1.7.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCHSET] workqueue: update workqueue users - replace create_workqueue()
[not found] <1294062595-30097-1-git-send-email-tj@kernel.org>
2011-01-03 13:49 ` [PATCH 02/32] powerpc/cell: use system_wq in cpufreq_spudemand Tejun Heo
2011-01-03 13:49 ` [PATCH 07/32] cpufreq: use system_wq instead of dedicated workqueues Tejun Heo
@ 2011-01-25 14:29 ` Tejun Heo
2011-01-25 16:26 ` Dave Jones
` (2 more replies)
2 siblings, 3 replies; 7+ messages in thread
From: Tejun Heo @ 2011-01-25 14:29 UTC (permalink / raw)
To: linux-kernel
Cc: lenb, linux-acpi, davej, cpufreq, Markus.Lidel, tomas.winkler,
jayamohank, andrew.vasquez, James.Bottomley, linux-scsi, tomof,
stf_xl, linux-usb, tytso, mfasheh, joel.becker, reiserfs-devel,
aelder, hch, ericvh, rminnich, v9fs-developer, lucho, andy.grover
Hello,
There was no response for the following patches and I'm planning on
routing them through workqueue#for-2.6.39. If you have an objection
or want to take the patch through a different tree, please let me
know.
0006-acpi-kacpi-_wq-don-t-need-WQ_MEM_RECLAIM.patch
0007-cpufreq-use-system_wq-instead-of-dedicated-workqueue.patch
0012-i2o-use-alloc_workqueue-instead-of-create_workqueue.patch
0013-misc-iwmc3200top-use-system_wq-instead-of-dedicated-.patch
0016-scsi-be2iscsi-qla2xxx-convert-to-alloc_workqueue.patch
0018-scsi-scsi_tgt_lib-scsi_tgtd-isn-t-used-in-memory-rec.patch
0019-usb-ueagle-atm-use-system_wq-instead-of-dedicated-wo.patch
0025-ext4-convert-to-alloc_workqueue.patch
0026-ocfs2-use-system_wq-instead-of-ocfs2_quota_wq.patch
0027-reiserfs-make-commit_wq-use-the-default-concurrency-.patch
0028-xfs-convert-to-alloc_workqueue.patch
0029-net-9p-use-system_wq-instead-of-p9_mux_wq.patch
0030-net-9p-replace-p9_poll_task-with-a-work.patch
0031-rds-ib-use-system_wq-instead-of-rds_ib_fmr_wq.patch
The whole series can be found at the following URL.
http://thread.gmane.org/gmane.linux.kernel/1082587
Thank you.
--
tejun
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHSET] workqueue: update workqueue users - replace create_workqueue()
2011-01-25 14:29 ` [PATCHSET] workqueue: update workqueue users - replace create_workqueue() Tejun Heo
@ 2011-01-25 16:26 ` Dave Jones
2011-01-26 10:40 ` Tejun Heo
2011-01-26 4:46 ` Greg KH
2011-02-01 10:44 ` Tejun Heo
2 siblings, 1 reply; 7+ messages in thread
From: Dave Jones @ 2011-01-25 16:26 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-kernel, lenb, linux-acpi, cpufreq
On Tue, Jan 25, 2011 at 03:29:21PM +0100, Tejun Heo wrote:
> Hello,
>
> There was no response for the following patches and I'm planning on
> routing them through workqueue#for-2.6.39. If you have an objection
> or want to take the patch through a different tree, please let me
> know.
> ..
> 0007-cpufreq-use-system_wq-instead-of-dedicated-workqueue.patch
Feel free to add my
Signed-off-by: Dave Jones <davej@redhat.com>
to this.
I looked it over, and didn't see anything objectionable.
Dave
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHSET] workqueue: update workqueue users - replace create_workqueue()
2011-01-25 14:29 ` [PATCHSET] workqueue: update workqueue users - replace create_workqueue() Tejun Heo
2011-01-25 16:26 ` Dave Jones
@ 2011-01-26 4:46 ` Greg KH
2011-02-01 10:44 ` Tejun Heo
2 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2011-01-26 4:46 UTC (permalink / raw)
To: Tejun Heo
Cc: linux-kernel, lenb, linux-acpi, davej, cpufreq, Markus.Lidel,
tomas.winkler, jayamohank, andrew.vasquez, James.Bottomley,
linux-scsi, tomof, stf_xl, linux-usb, tytso, mfasheh, joel.becker,
reiserfs-devel, aelder, hch, ericvh, rminnich, v9fs-developer,
lucho, andy.grover
On Tue, Jan 25, 2011 at 03:29:21PM +0100, Tejun Heo wrote:
> Hello,
>
> There was no response for the following patches and I'm planning on
> routing them through workqueue#for-2.6.39. If you have an objection
> or want to take the patch through a different tree, please let me
> know.
>
> 0019-usb-ueagle-atm-use-system_wq-instead-of-dedicated-wo.patch
I've already taken this in my usb-next tree to go into .39.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHSET] workqueue: update workqueue users - replace create_workqueue()
2011-01-25 16:26 ` Dave Jones
@ 2011-01-26 10:40 ` Tejun Heo
0 siblings, 0 replies; 7+ messages in thread
From: Tejun Heo @ 2011-01-26 10:40 UTC (permalink / raw)
To: Dave Jones, linux-kernel, lenb, linux-acpi, cpufreq
On Tue, Jan 25, 2011 at 11:26:54AM -0500, Dave Jones wrote:
> On Tue, Jan 25, 2011 at 03:29:21PM +0100, Tejun Heo wrote:
> > Hello,
> >
> > There was no response for the following patches and I'm planning on
> > routing them through workqueue#for-2.6.39. If you have an objection
> > or want to take the patch through a different tree, please let me
> > know.
> > ..
> > 0007-cpufreq-use-system_wq-instead-of-dedicated-workqueue.patch
>
> Feel free to add my
> Signed-off-by: Dave Jones <davej@redhat.com>
> to this.
>
> I looked it over, and didn't see anything objectionable.
As the patch is going through wq tree, I added Acked-by instead of
Signed-off-by.
Thank you.
--
tejun
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCHSET] workqueue: update workqueue users - replace create_workqueue()
2011-01-25 14:29 ` [PATCHSET] workqueue: update workqueue users - replace create_workqueue() Tejun Heo
2011-01-25 16:26 ` Dave Jones
2011-01-26 4:46 ` Greg KH
@ 2011-02-01 10:44 ` Tejun Heo
2 siblings, 0 replies; 7+ messages in thread
From: Tejun Heo @ 2011-02-01 10:44 UTC (permalink / raw)
To: linux-kernel
Cc: lenb, linux-acpi, davej, cpufreq, Markus.Lidel, tomas.winkler,
jayamohank, andrew.vasquez, James.Bottomley, linux-scsi, tomof,
stf_xl, linux-usb, tytso, mfasheh, joel.becker, reiserfs-devel,
aelder, hch, ericvh, rminnich, v9fs-developer, lucho, andy.grover
On Tue, Jan 25, 2011 at 03:29:21PM +0100, Tejun Heo wrote:
> Hello,
>
> There was no response for the following patches and I'm planning on
> routing them through workqueue#for-2.6.39. If you have an objection
> or want to take the patch through a different tree, please let me
> know.
>
> 0006-acpi-kacpi-_wq-don-t-need-WQ_MEM_RECLAIM.patch
> 0007-cpufreq-use-system_wq-instead-of-dedicated-workqueue.patch
> 0012-i2o-use-alloc_workqueue-instead-of-create_workqueue.patch
> 0013-misc-iwmc3200top-use-system_wq-instead-of-dedicated-.patch
> 0016-scsi-be2iscsi-qla2xxx-convert-to-alloc_workqueue.patch
> 0018-scsi-scsi_tgt_lib-scsi_tgtd-isn-t-used-in-memory-rec.patch
> 0019-usb-ueagle-atm-use-system_wq-instead-of-dedicated-wo.patch
> 0025-ext4-convert-to-alloc_workqueue.patch
> 0026-ocfs2-use-system_wq-instead-of-ocfs2_quota_wq.patch
> 0027-reiserfs-make-commit_wq-use-the-default-concurrency-.patch
> 0028-xfs-convert-to-alloc_workqueue.patch
> 0029-net-9p-use-system_wq-instead-of-p9_mux_wq.patch
> 0030-net-9p-replace-p9_poll_task-with-a-work.patch
> 0031-rds-ib-use-system_wq-instead-of-rds_ib_fmr_wq.patch
Patches applied to wq#for-2.6.39 w/ collected acks added.
Thank you.
--
tejun
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-02-01 10:44 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1294062595-30097-1-git-send-email-tj@kernel.org>
2011-01-03 13:49 ` [PATCH 02/32] powerpc/cell: use system_wq in cpufreq_spudemand Tejun Heo
2011-01-03 13:49 ` [PATCH 07/32] cpufreq: use system_wq instead of dedicated workqueues Tejun Heo
2011-01-25 14:29 ` [PATCHSET] workqueue: update workqueue users - replace create_workqueue() Tejun Heo
2011-01-25 16:26 ` Dave Jones
2011-01-26 10:40 ` Tejun Heo
2011-01-26 4:46 ` Greg KH
2011-02-01 10:44 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox