Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1472636 > unrolled thread

[PATCH] dm-bufio: Remove deprecated create_singlethread_workqueue

Started byBhaktipriya Shridhar <bhaktipriya96@gmail.com>
First post2016-08-30 18:50 +0200
Last post2016-08-31 16:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] dm-bufio: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar <bhaktipriya96@gmail.com> - 2016-08-30 18:50 +0200
    Re: [PATCH] dm-bufio: Remove deprecated create_singlethread_workqueue Tejun Heo <tj@kernel.org> - 2016-08-31 16:30 +0200

#1472636 — [PATCH] dm-bufio: Remove deprecated create_singlethread_workqueue

FromBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Date2016-08-30 18:50 +0200
Subject[PATCH] dm-bufio: Remove deprecated create_singlethread_workqueue
Message-ID<sbUox-7nH-13@gated-at.bofh.it>
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.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
 drivers/md/dm-bufio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c
index cd77216..d073ec1 100644
--- a/drivers/md/dm-bufio.c
+++ b/drivers/md/dm-bufio.c
@@ -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

[toc] | [next] | [standalone]


#1473530

FromTejun Heo <tj@kernel.org>
Date2016-08-31 16:30 +0200
Message-ID<sceGB-3xO-15@gated-at.bofh.it>
In reply to#1472636
On Tue, Aug 30, 2016 at 10:19:11PM +0530, Bhaktipriya Shridhar wrote:
> 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.
> 
> Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

-- 
tejun

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web