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 1/4] fs/afs/vlocation: Remove deprecated create_singlethread_workqueue
Date: Wed, 31 Aug 2016 02:02:40 +0530	[thread overview]
Message-ID: <960cff8a55c83c0d8846306c1b286ec545e9e5f4.1472589043.git.bhaktipriya96@gmail.com> (raw)
In-Reply-To: <cover.1472589043.git.bhaktipriya96@gmail.com>

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

Since the workqueue is being used on a memory reclaim path, WQ_MEM_RECLAIM
flag has been set to ensure 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>
---
 Changes in v2:
	-No change.

 fs/afs/vlocation.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c
index 5297678..45a8639 100644
--- a/fs/afs/vlocation.c
+++ b/fs/afs/vlocation.c
@@ -594,8 +594,8 @@ static void afs_vlocation_reaper(struct work_struct *work)
  */
 int __init afs_vlocation_update_init(void)
 {
-	afs_vlocation_update_worker =
-		create_singlethread_workqueue("kafs_vlupdated");
+	afs_vlocation_update_worker = alloc_workqueue("kafs_vlupdated",
+						      WQ_MEM_RECLAIM, 0);
 	return afs_vlocation_update_worker ? 0 : -ENOMEM;
 }

--
2.1.4

       reply	other threads:[~2016-08-30 20:32 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 ` Bhaktipriya Shridhar [this message]
2016-08-30 20:33 ` [PATCH v2 2/4] fs/afs/rxrpc: " Bhaktipriya Shridhar
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=960cff8a55c83c0d8846306c1b286ec545e9e5f4.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®