mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
To: David Howells <dhowells@redhat.com>
Cc: linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org,
	Tejun Heo <tj@kernel.org>
Subject: [PATCH v2 2/4] fs/afs/rxrpc: Remove deprecated create_singlethread_workqueue
Date: Wed, 31 Aug 2016 02:03:12 +0530	[thread overview]
Message-ID: <a04d6244bb617cbbf8b6bda028715c7280d65f41.1472589043.git.bhaktipriya96@gmail.com> (raw)
In-Reply-To: <cover.1472589043.git.bhaktipriya96@gmail.com>

The workqueue "afs_async_calls" queues a single work item viz
&call->async_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 to ensure forward progress under
memory pressure because the workqueue is being used on a memory reclaim
path.

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

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
 Changes in v2:
	-No change

 fs/afs/rxrpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c
index 63cd9f9..4f9e9b3 100644
--- a/fs/afs/rxrpc.c
+++ b/fs/afs/rxrpc.c
@@ -85,7 +85,7 @@ int afs_open_socket(void)

 	skb_queue_head_init(&afs_incoming_calls);

-	afs_async_calls = create_singlethread_workqueue("kafsd");
+	afs_async_calls = alloc_workqueue("kafsd", WQ_MEM_RECLAIM, 0);
 	if (!afs_async_calls) {
 		_leave(" = -ENOMEM [wq]");
 		return -ENOMEM;
--
2.1.4

  parent reply	other threads:[~2016-08-30 20:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1472589043.git.bhaktipriya96@gmail.com>
2016-08-30 20:32 ` [PATCH v2 1/4] fs/afs/vlocation: " Bhaktipriya Shridhar
2016-08-30 20:33 ` Bhaktipriya Shridhar [this message]
2016-08-30 20:33 ` [PATCH v2 3/4] fs/afs/callback: " Bhaktipriya Shridhar
2016-08-30 20:34 ` [PATCH v2 4/4] fs/afs/flock: " Bhaktipriya Shridhar
2016-08-30 22:15 ` [PATCH v2 2/4] fs/afs/rxrpc: " David Howells
2016-08-31 14:40   ` Tejun Heo
2016-08-31 20:24   ` David Howells
2016-08-31 21:17     ` Tejun Heo
2016-09-01 13:45       ` Bhaktipriya Shridhar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a04d6244bb617cbbf8b6bda028715c7280d65f41.1472589043.git.bhaktipriya96@gmail.com \
    --to=bhaktipriya96@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®