From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754142AbcIDPVC (ORCPT ); Sun, 4 Sep 2016 11:21:02 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:32808 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752971AbcIDPVB (ORCPT ); Sun, 4 Sep 2016 11:21:01 -0400 Date: Sun, 4 Sep 2016 20:53:42 +0530 From: Bhaktipriya Shridhar To: David Howells Cc: linux-kernel@vger.kernel.org, linux-afs@lists.infradead.org, Tejun Heo Subject: [PATCH v3 2/4] fs/afs/rxrpc: Remove deprecated create_singlethread_workqueue Message-ID: <9555883cbbf8a995e955a6696952e95f1bdd774b.1473002371.git.bhaktipriya96@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The workqueue "afs_async_calls" queues work item &call->async_work per afs_call. Since there could be multiple calls and since these calls can be run concurrently, 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 --- Changes in v3: - Updated patch description 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