Skip to contentSkip to conversation

dm-bufio: Remove deprecated create_singlethread_workqueue

PATCH In review Bhaktipriya Shridhar 2 participants 2 messages Aug 30, 2016 – Aug 31, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm-bufio: Remove deprecated create_singlethread_workqueue

The workqueue "dm_bufio_wq" queues a single work item &dm_bufio_work and hence it doesn't require execution ordering. Hence, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance.

The WQ_MEM_RECLAIM flag has been set since md / dm are block multi disk drivers and require forward progress under memory pressure.

Since there are fixed number of work items, explicit concurrency limit is unnecessary here.

---
 drivers/md/dm-bufio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-bufio.c +1 -1
index cd77216..d073ec1 100644
@@ -1876,7 +1876,7 @@ static int __init dm_bufio_init(void)
 	__cache_size_refresh();
 	mutex_unlock(&dm_bufio_clients_lock);
 
-	dm_bufio_wq = create_singlethread_workqueue("dm_bufio_cache");
+	dm_bufio_wq = alloc_workqueue("dm_bufio_cache", WQ_MEM_RECLAIM, 0);
 	if (!dm_bufio_wq)
 		return -ENOMEM;
 

--
2.1.4

Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Bhaktipriya Shridhar

The workqueue "dm_bufio_wq" queues a single work item &dm_bufio_work and hence it doesn't require execution ordering. Hence, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance.

The WQ_MEM_RECLAIM flag has been set since md / dm are block multi disk drivers and require forward progress under memory pressure.

Since there are fixed number of work items, explicit concurrency limit is unnecessary here.

Thanks.

Signature · 1 line
tejun