linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dm-bufio: Remove deprecated create_singlethread_workqueue
@ 2016-08-30 16:49 Bhaktipriya Shridhar
  2016-08-31 14:21 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Bhaktipriya Shridhar @ 2016-08-30 16:49 UTC (permalink / raw)
  To: Alasdair Kergon, Mike Snitzer, dm-devel, Shaohua Li
  Cc: Tejun Heo, linux-raid, linux-kernel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dm-bufio: Remove deprecated create_singlethread_workqueue
  2016-08-30 16:49 [PATCH] dm-bufio: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
@ 2016-08-31 14:21 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2016-08-31 14:21 UTC (permalink / raw)
  To: Bhaktipriya Shridhar
  Cc: Alasdair Kergon, Mike Snitzer, dm-devel, Shaohua Li, linux-raid,
	linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-31 14:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-30 16:49 [PATCH] dm-bufio: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
2016-08-31 14:21 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).