fs/afs: Remove deprecated create_singlethread_workqueue
v3 cover fs/afs: Remove deprecated create_singlethread_workqueue
This patch set removes deprecated create_singlethread_workqueue usages in fs/afs.
Bhaktipriya Shridhar (4):
fs/afs/vlocation: Remove deprecated create_singlethread_workqueue fs/afs/rxrpc: Remove deprecated create_singlethread_workqueue fs/afs/callback: Remove deprecated create_singlethread_workqueue fs/afs/flock: Remove deprecated create_singlethread_workqueue
fs/afs/callback.c | 4 ++-- fs/afs/flock.c | 4 ++-- fs/afs/rxrpc.c | 2 +- fs/afs/vlocation.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-)
--
2.1.4
PATCH v3 1/4 fs/afs/vlocation: Remove deprecated create_singlethread_workqueue
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.
---
Changes in v3:
- No change
fs/afs/vlocation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/afs/vlocation.c +2 -2
@@ -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
PATCH v3 2/4 fs/afs/rxrpc: Remove deprecated create_singlethread_workqueue
In reply to Bhaktipriya ShridharThe 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.
---
Changes in v3:
- Updated patch description
fs/afs/rxrpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/afs/rxrpc.c +1 -1
@@ -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
PATCH v3 3/4 fs/afs/callback: Remove deprecated create_singlethread_workqueue
In reply to Bhaktipriya ShridharThe workqueue "afs_callback_update_worker" queues multiple work items viz &vnode->cb_broken_work, &server->cb_break_work which require strict execution ordering. Hence, an ordered dedicated workqueue has been used.
Since the workqueue is being used on a memory reclaim path, WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure.
---
Changes in v3:
-No change
fs/afs/callback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/afs/callback.c +2 -2
@@ -461,8 +461,8 @@ static void afs_callback_updater(struct work_struct *work)*/ int __init afs_callback_update_init (void ) { - afs_callback_update_worker = -create_singlethread_workqueue ("kafs_callbackd" ); + afs_callback_update_worker =alloc_ordered_workqueue ("kafs_callbackd" , +WQ_MEM_RECLAIM );return afs_callback_update_worker ?0 : -ENOMEM ; }
--
2.1.4
PATCH v3 4/4 fs/afs/flock: Remove deprecated create_singlethread_workqueue
In reply to Bhaktipriya ShridharThe workqueue "afs_lock_manager" queues work item &vnode->lock_work, per vnode. Since there can be multiple vnodes and since their work items can be executed 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.
---
Changes in v3:
-Updated patch description
fs/afs/flock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/afs/flock.c +2 -2
@@ -36,8 +36,8 @@ static int afs_init_lock_manager(void)if (!afs_lock_manager) {mutex_lock (&afs_lock_manager_mutex);if (!afs_lock_manager) { - afs_lock_manager = -create_singlethread_workqueue ("kafs_lockd" ); + afs_lock_manager =alloc_workqueue ("kafs_lockd" , +WQ_MEM_RECLAIM ,0 );if (!afs_lock_manager) ret = -ENOMEM ; }
--
2.1.4
Quoted 2 lines · Bhaktipriya Shridhar
This patch set removes deprecated
create_singlethread_workqueueusages in fs/afs.
Applied.
David