diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 11:20:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 11:20:19 -0400 |
commit | bd2895eeade5f11f3e5906283c630bbdb4b57454 (patch) | |
tree | 4d98f4fcd80c7d062afce28823d08aee53e66f82 /fs | |
parent | 016aa2ed1cc9cf704cf76d8df07751b6daa9750f (diff) | |
parent | 24d51add7438f9696a7205927bf9de3c5c787a58 (diff) |
Merge branch 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
* 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq:
workqueue: fix build failure introduced by s/freezeable/freezable/
workqueue: add system_freezeable_wq
rds/ib: use system_wq instead of rds_ib_fmr_wq
net/9p: replace p9_poll_task with a work
net/9p: use system_wq instead of p9_mux_wq
xfs: convert to alloc_workqueue()
reiserfs: make commit_wq use the default concurrency level
ocfs2: use system_wq instead of ocfs2_quota_wq
ext4: convert to alloc_workqueue()
scsi/scsi_tgt_lib: scsi_tgtd isn't used in memory reclaim path
scsi/be2iscsi,qla2xxx: convert to alloc_workqueue()
misc/iwmc3200top: use system_wq instead of dedicated workqueues
i2o: use alloc_workqueue() instead of create_workqueue()
acpi: kacpi*_wq don't need WQ_MEM_RECLAIM
fs/aio: aio_wq isn't used in memory reclaim path
input/tps6507x-ts: use system_wq instead of dedicated workqueue
cpufreq: use system_wq instead of dedicated workqueues
wireless/ipw2x00: use system_wq instead of dedicated workqueues
arm/omap: use system_wq in mailbox
workqueue: use WQ_MEM_RECLAIM instead of WQ_RESCUER
Diffstat (limited to 'fs')
-rw-r--r-- | fs/aio.c | 4 | ||||
-rw-r--r-- | fs/ext4/super.c | 7 | ||||
-rw-r--r-- | fs/nfs/inode.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/quota.h | 3 | ||||
-rw-r--r-- | fs/ocfs2/quota_global.c | 27 | ||||
-rw-r--r-- | fs/ocfs2/super.c | 7 | ||||
-rw-r--r-- | fs/reiserfs/journal.c | 2 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 5 | ||||
-rw-r--r-- | fs/xfs/xfs_mru_cache.c | 2 |
9 files changed, 18 insertions, 41 deletions
@@ -85,7 +85,7 @@ static int __init aio_setup(void) | |||
85 | kiocb_cachep = KMEM_CACHE(kiocb, SLAB_HWCACHE_ALIGN|SLAB_PANIC); | 85 | kiocb_cachep = KMEM_CACHE(kiocb, SLAB_HWCACHE_ALIGN|SLAB_PANIC); |
86 | kioctx_cachep = KMEM_CACHE(kioctx,SLAB_HWCACHE_ALIGN|SLAB_PANIC); | 86 | kioctx_cachep = KMEM_CACHE(kioctx,SLAB_HWCACHE_ALIGN|SLAB_PANIC); |
87 | 87 | ||
88 | aio_wq = create_workqueue("aio"); | 88 | aio_wq = alloc_workqueue("aio", 0, 1); /* used to limit concurrency */ |
89 | abe_pool = mempool_create_kmalloc_pool(1, sizeof(struct aio_batch_entry)); | 89 | abe_pool = mempool_create_kmalloc_pool(1, sizeof(struct aio_batch_entry)); |
90 | BUG_ON(!aio_wq || !abe_pool); | 90 | BUG_ON(!aio_wq || !abe_pool); |
91 | 91 | ||
@@ -577,7 +577,7 @@ static int __aio_put_req(struct kioctx *ctx, struct kiocb *req) | |||
577 | spin_lock(&fput_lock); | 577 | spin_lock(&fput_lock); |
578 | list_add(&req->ki_list, &fput_head); | 578 | list_add(&req->ki_list, &fput_head); |
579 | spin_unlock(&fput_lock); | 579 | spin_unlock(&fput_lock); |
580 | queue_work(aio_wq, &fput_work); | 580 | schedule_work(&fput_work); |
581 | } else { | 581 | } else { |
582 | req->ki_filp = NULL; | 582 | req->ki_filp = NULL; |
583 | really_put_req(ctx, req); | 583 | really_put_req(ctx, req); |
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 5977b356a435..203f9e4a70be 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -3511,7 +3511,12 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
3511 | percpu_counter_set(&sbi->s_dirtyblocks_counter, 0); | 3511 | percpu_counter_set(&sbi->s_dirtyblocks_counter, 0); |
3512 | 3512 | ||
3513 | no_journal: | 3513 | no_journal: |
3514 | EXT4_SB(sb)->dio_unwritten_wq = create_workqueue("ext4-dio-unwritten"); | 3514 | /* |
3515 | * The maximum number of concurrent works can be high and | ||
3516 | * concurrency isn't really necessary. Limit it to 1. | ||
3517 | */ | ||
3518 | EXT4_SB(sb)->dio_unwritten_wq = | ||
3519 | alloc_workqueue("ext4-dio-unwritten", WQ_MEM_RECLAIM, 1); | ||
3515 | if (!EXT4_SB(sb)->dio_unwritten_wq) { | 3520 | if (!EXT4_SB(sb)->dio_unwritten_wq) { |
3516 | printk(KERN_ERR "EXT4-fs: failed to create DIO workqueue\n"); | 3521 | printk(KERN_ERR "EXT4-fs: failed to create DIO workqueue\n"); |
3517 | goto failed_mount_wq; | 3522 | goto failed_mount_wq; |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 2f8e61816d75..01768e5e2c9b 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -1518,7 +1518,7 @@ static int nfsiod_start(void) | |||
1518 | { | 1518 | { |
1519 | struct workqueue_struct *wq; | 1519 | struct workqueue_struct *wq; |
1520 | dprintk("RPC: creating workqueue nfsiod\n"); | 1520 | dprintk("RPC: creating workqueue nfsiod\n"); |
1521 | wq = alloc_workqueue("nfsiod", WQ_RESCUER, 0); | 1521 | wq = alloc_workqueue("nfsiod", WQ_MEM_RECLAIM, 0); |
1522 | if (wq == NULL) | 1522 | if (wq == NULL) |
1523 | return -ENOMEM; | 1523 | return -ENOMEM; |
1524 | nfsiod_workqueue = wq; | 1524 | nfsiod_workqueue = wq; |
diff --git a/fs/ocfs2/quota.h b/fs/ocfs2/quota.h index 196fcb52d95d..d5ab56cbe5c5 100644 --- a/fs/ocfs2/quota.h +++ b/fs/ocfs2/quota.h | |||
@@ -114,7 +114,4 @@ int ocfs2_local_write_dquot(struct dquot *dquot); | |||
114 | extern const struct dquot_operations ocfs2_quota_operations; | 114 | extern const struct dquot_operations ocfs2_quota_operations; |
115 | extern struct quota_format_type ocfs2_quota_format; | 115 | extern struct quota_format_type ocfs2_quota_format; |
116 | 116 | ||
117 | int ocfs2_quota_setup(void); | ||
118 | void ocfs2_quota_shutdown(void); | ||
119 | |||
120 | #endif /* _OCFS2_QUOTA_H */ | 117 | #endif /* _OCFS2_QUOTA_H */ |
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index 4607923eb24c..a73f64166481 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c | |||
@@ -63,8 +63,6 @@ | |||
63 | * write to gf | 63 | * write to gf |
64 | */ | 64 | */ |
65 | 65 | ||
66 | static struct workqueue_struct *ocfs2_quota_wq = NULL; | ||
67 | |||
68 | static void qsync_work_fn(struct work_struct *work); | 66 | static void qsync_work_fn(struct work_struct *work); |
69 | 67 | ||
70 | static void ocfs2_global_disk2memdqb(struct dquot *dquot, void *dp) | 68 | static void ocfs2_global_disk2memdqb(struct dquot *dquot, void *dp) |
@@ -400,8 +398,8 @@ int ocfs2_global_read_info(struct super_block *sb, int type) | |||
400 | OCFS2_QBLK_RESERVED_SPACE; | 398 | OCFS2_QBLK_RESERVED_SPACE; |
401 | oinfo->dqi_gi.dqi_qtree_depth = qtree_depth(&oinfo->dqi_gi); | 399 | oinfo->dqi_gi.dqi_qtree_depth = qtree_depth(&oinfo->dqi_gi); |
402 | INIT_DELAYED_WORK(&oinfo->dqi_sync_work, qsync_work_fn); | 400 | INIT_DELAYED_WORK(&oinfo->dqi_sync_work, qsync_work_fn); |
403 | queue_delayed_work(ocfs2_quota_wq, &oinfo->dqi_sync_work, | 401 | schedule_delayed_work(&oinfo->dqi_sync_work, |
404 | msecs_to_jiffies(oinfo->dqi_syncms)); | 402 | msecs_to_jiffies(oinfo->dqi_syncms)); |
405 | 403 | ||
406 | out_err: | 404 | out_err: |
407 | mlog_exit(status); | 405 | mlog_exit(status); |
@@ -635,8 +633,8 @@ static void qsync_work_fn(struct work_struct *work) | |||
635 | struct super_block *sb = oinfo->dqi_gqinode->i_sb; | 633 | struct super_block *sb = oinfo->dqi_gqinode->i_sb; |
636 | 634 | ||
637 | dquot_scan_active(sb, ocfs2_sync_dquot_helper, oinfo->dqi_type); | 635 | dquot_scan_active(sb, ocfs2_sync_dquot_helper, oinfo->dqi_type); |
638 | queue_delayed_work(ocfs2_quota_wq, &oinfo->dqi_sync_work, | 636 | schedule_delayed_work(&oinfo->dqi_sync_work, |
639 | msecs_to_jiffies(oinfo->dqi_syncms)); | 637 | msecs_to_jiffies(oinfo->dqi_syncms)); |
640 | } | 638 | } |
641 | 639 | ||
642 | /* | 640 | /* |
@@ -923,20 +921,3 @@ const struct dquot_operations ocfs2_quota_operations = { | |||
923 | .alloc_dquot = ocfs2_alloc_dquot, | 921 | .alloc_dquot = ocfs2_alloc_dquot, |
924 | .destroy_dquot = ocfs2_destroy_dquot, | 922 | .destroy_dquot = ocfs2_destroy_dquot, |
925 | }; | 923 | }; |
926 | |||
927 | int ocfs2_quota_setup(void) | ||
928 | { | ||
929 | ocfs2_quota_wq = create_workqueue("o2quot"); | ||
930 | if (!ocfs2_quota_wq) | ||
931 | return -ENOMEM; | ||
932 | return 0; | ||
933 | } | ||
934 | |||
935 | void ocfs2_quota_shutdown(void) | ||
936 | { | ||
937 | if (ocfs2_quota_wq) { | ||
938 | flush_workqueue(ocfs2_quota_wq); | ||
939 | destroy_workqueue(ocfs2_quota_wq); | ||
940 | ocfs2_quota_wq = NULL; | ||
941 | } | ||
942 | } | ||
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 36c423fb0635..236ed1bdca2c 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -1657,16 +1657,11 @@ static int __init ocfs2_init(void) | |||
1657 | mlog(ML_ERROR, "Unable to create ocfs2 debugfs root.\n"); | 1657 | mlog(ML_ERROR, "Unable to create ocfs2 debugfs root.\n"); |
1658 | } | 1658 | } |
1659 | 1659 | ||
1660 | status = ocfs2_quota_setup(); | ||
1661 | if (status) | ||
1662 | goto leave; | ||
1663 | |||
1664 | ocfs2_set_locking_protocol(); | 1660 | ocfs2_set_locking_protocol(); |
1665 | 1661 | ||
1666 | status = register_quota_format(&ocfs2_quota_format); | 1662 | status = register_quota_format(&ocfs2_quota_format); |
1667 | leave: | 1663 | leave: |
1668 | if (status < 0) { | 1664 | if (status < 0) { |
1669 | ocfs2_quota_shutdown(); | ||
1670 | ocfs2_free_mem_caches(); | 1665 | ocfs2_free_mem_caches(); |
1671 | exit_ocfs2_uptodate_cache(); | 1666 | exit_ocfs2_uptodate_cache(); |
1672 | } | 1667 | } |
@@ -1683,8 +1678,6 @@ static void __exit ocfs2_exit(void) | |||
1683 | { | 1678 | { |
1684 | mlog_entry_void(); | 1679 | mlog_entry_void(); |
1685 | 1680 | ||
1686 | ocfs2_quota_shutdown(); | ||
1687 | |||
1688 | if (ocfs2_wq) { | 1681 | if (ocfs2_wq) { |
1689 | flush_workqueue(ocfs2_wq); | 1682 | flush_workqueue(ocfs2_wq); |
1690 | destroy_workqueue(ocfs2_wq); | 1683 | destroy_workqueue(ocfs2_wq); |
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 3eea859e6990..c77514bd5776 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -2876,7 +2876,7 @@ int journal_init(struct super_block *sb, const char *j_dev_name, | |||
2876 | reiserfs_mounted_fs_count++; | 2876 | reiserfs_mounted_fs_count++; |
2877 | if (reiserfs_mounted_fs_count <= 1) { | 2877 | if (reiserfs_mounted_fs_count <= 1) { |
2878 | reiserfs_write_unlock(sb); | 2878 | reiserfs_write_unlock(sb); |
2879 | commit_wq = create_workqueue("reiserfs"); | 2879 | commit_wq = alloc_workqueue("reiserfs", WQ_MEM_RECLAIM, 0); |
2880 | reiserfs_write_lock(sb); | 2880 | reiserfs_write_lock(sb); |
2881 | } | 2881 | } |
2882 | 2882 | ||
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index ac1c7e8378dd..f83a4c830a65 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -2022,11 +2022,12 @@ xfs_buf_init(void) | |||
2022 | if (!xfslogd_workqueue) | 2022 | if (!xfslogd_workqueue) |
2023 | goto out_free_buf_zone; | 2023 | goto out_free_buf_zone; |
2024 | 2024 | ||
2025 | xfsdatad_workqueue = create_workqueue("xfsdatad"); | 2025 | xfsdatad_workqueue = alloc_workqueue("xfsdatad", WQ_MEM_RECLAIM, 1); |
2026 | if (!xfsdatad_workqueue) | 2026 | if (!xfsdatad_workqueue) |
2027 | goto out_destroy_xfslogd_workqueue; | 2027 | goto out_destroy_xfslogd_workqueue; |
2028 | 2028 | ||
2029 | xfsconvertd_workqueue = create_workqueue("xfsconvertd"); | 2029 | xfsconvertd_workqueue = alloc_workqueue("xfsconvertd", |
2030 | WQ_MEM_RECLAIM, 1); | ||
2030 | if (!xfsconvertd_workqueue) | 2031 | if (!xfsconvertd_workqueue) |
2031 | goto out_destroy_xfsdatad_workqueue; | 2032 | goto out_destroy_xfsdatad_workqueue; |
2032 | 2033 | ||
diff --git a/fs/xfs/xfs_mru_cache.c b/fs/xfs/xfs_mru_cache.c index edfa178bafb6..4aff56395732 100644 --- a/fs/xfs/xfs_mru_cache.c +++ b/fs/xfs/xfs_mru_cache.c | |||
@@ -309,7 +309,7 @@ xfs_mru_cache_init(void) | |||
309 | if (!xfs_mru_elem_zone) | 309 | if (!xfs_mru_elem_zone) |
310 | goto out; | 310 | goto out; |
311 | 311 | ||
312 | xfs_mru_reap_wq = create_singlethread_workqueue("xfs_mru_cache"); | 312 | xfs_mru_reap_wq = alloc_workqueue("xfs_mru_cache", WQ_MEM_RECLAIM, 1); |
313 | if (!xfs_mru_reap_wq) | 313 | if (!xfs_mru_reap_wq) |
314 | goto out_destroy_mru_elem_zone; | 314 | goto out_destroy_mru_elem_zone; |
315 | 315 | ||