diff options
| author | Bhaktipriya Shridhar <bhaktipriya96@gmail.com> | 2016-06-07 16:27:19 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@fb.com> | 2016-06-11 22:03:04 -0400 |
| commit | 81baf90af2dcc8259e99e2f236024524b55313fc (patch) | |
| tree | d042b3d5d364ccae3e206615f5a3a1407e3e0859 /drivers/md/bcache | |
| parent | 288dab8a35a0bde426a09870943c8d3ee3a50dab (diff) | |
bcache: Remove deprecated create_workqueue
alloc_workqueue replaces deprecated create_workqueue().
Dedicated workqueues have been used since bcache_wq and moving_gc_wq
are workqueues for writes and are being used on a memory reclaim path.
WQ_MEM_RECLAIM has been set to ensure forward progress under memory
pressure.
Since there are only a fixed number of work items, explicit concurrency
limit is unnecessary here.
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/md/bcache')
| -rw-r--r-- | drivers/md/bcache/super.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index c944daf75dd0..d542438b18df 100644 --- a/drivers/md/bcache/super.c +++ b/drivers/md/bcache/super.c | |||
| @@ -1520,7 +1520,8 @@ struct cache_set *bch_cache_set_alloc(struct cache_sb *sb) | |||
| 1520 | !(c->fill_iter = mempool_create_kmalloc_pool(1, iter_size)) || | 1520 | !(c->fill_iter = mempool_create_kmalloc_pool(1, iter_size)) || |
| 1521 | !(c->bio_split = bioset_create(4, offsetof(struct bbio, bio))) || | 1521 | !(c->bio_split = bioset_create(4, offsetof(struct bbio, bio))) || |
| 1522 | !(c->uuids = alloc_bucket_pages(GFP_KERNEL, c)) || | 1522 | !(c->uuids = alloc_bucket_pages(GFP_KERNEL, c)) || |
| 1523 | !(c->moving_gc_wq = create_workqueue("bcache_gc")) || | 1523 | !(c->moving_gc_wq = alloc_workqueue("bcache_gc", |
| 1524 | WQ_MEM_RECLAIM, 0)) || | ||
| 1524 | bch_journal_alloc(c) || | 1525 | bch_journal_alloc(c) || |
| 1525 | bch_btree_cache_alloc(c) || | 1526 | bch_btree_cache_alloc(c) || |
| 1526 | bch_open_buckets_alloc(c) || | 1527 | bch_open_buckets_alloc(c) || |
| @@ -2099,7 +2100,7 @@ static int __init bcache_init(void) | |||
| 2099 | return bcache_major; | 2100 | return bcache_major; |
| 2100 | } | 2101 | } |
| 2101 | 2102 | ||
| 2102 | if (!(bcache_wq = create_workqueue("bcache")) || | 2103 | if (!(bcache_wq = alloc_workqueue("bcache", WQ_MEM_RECLAIM, 0)) || |
| 2103 | !(bcache_kobj = kobject_create_and_add("bcache", fs_kobj)) || | 2104 | !(bcache_kobj = kobject_create_and_add("bcache", fs_kobj)) || |
| 2104 | sysfs_create_files(bcache_kobj, files) || | 2105 | sysfs_create_files(bcache_kobj, files) || |
| 2105 | bch_request_init() || | 2106 | bch_request_init() || |
