Remove deprecated create_singlethread_workqueue
Subsystems (3)
cover Remove deprecated create_singlethread_workqueue
This patch set removes deprecated create_singlethread_workqueue usages in fs/.
Bhaktipriya Shridhar (9):
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/ocfs2/dlmfs: Remove deprecated create_singlethread_workqueue fs/ocfs2/cluster: Remove deprecated create_singlethread_workqueue fs/ocfs2/super: Remove deprecated create_singlethread_workqueue fs/ocfs2/dlm: Remove deprecated create_singlethread_workqueue fs/nfsd/nfs4callback: 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 ++-- fs/nfsd/nfs4callback.c | 2 +- fs/ocfs2/cluster/tcp.c | 2 +- fs/ocfs2/dlm/dlmdomain.c | 2 +- fs/ocfs2/dlmfs/dlmfs.c | 2 +- fs/ocfs2/super.c | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-)
--
2.1.4
PATCH 1/9 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.
--- 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 2/9 fs/afs/rxrpc: Remove deprecated create_singlethread_workqueue
In reply to Bhaktipriya ShridharThe 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.
--- 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 3/9 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.
--- 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 4/9 fs/afs/flock: Remove deprecated create_singlethread_workqueue
In reply to Bhaktipriya ShridharThe workqueue "afs_lock_manager" queues a single work item &vnode->lock_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.
--- 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
Re: [PATCH 4/9] fs/afs/flock: Remove deprecated create_singlethread_workqueue
Quoted 5 lines · Bhaktipriya Shridhar
The workqueue "
afs_lock_manager" queues a single work item&vnode->lock_work, and hence it doesn't require execution ordering. Hence,alloc_workqueuehas been used to replace the deprecatedcreate_singlethread_workqueueinstance.
Quoted 8 lines
The
WQ_MEM_RECLAIMflag 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 <[email protected]>
For all afs patches,
Thanks.
Signature · 1 line
tejun
PATCH 5/9 fs/ocfs2/dlmfs: Remove deprecated create_singlethread_workqueue
In reply to Bhaktipriya ShridharThe workqueue "user_dlm_worker" queues a single work item &lockres->l_work per user_lock_res instance 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.
Since there are fixed number of work items, explicit concurrency limit is unnecessary here.
--- fs/ocfs2/dlmfs/dlmfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/dlmfs/dlmfs.c +1 -1
@@ -646,7 +646,7 @@ static int __init init_dlmfs_fs(void) } cleanup_inode =1 ; - user_dlm_worker =create_singlethread_workqueue ("user_dlm" ); + user_dlm_worker =alloc_workqueue ("user_dlm" ,WQ_MEM_RECLAIM ,0 );if (!user_dlm_worker) { status = -ENOMEM ; goto bail;
--
2.1.4
PATCH 6/9 fs/ocfs2/cluster: Remove deprecated create_singlethread_workqueue
In reply to Bhaktipriya ShridharThe workqueue "o2net_wq" queues multiple work items viz &old_sc->sc_shutdown_work, &sc->sc_rx_work, &sc->sc_connect_work which require strict execution ordering. Hence, an ordered dedicated workqueue has been used.
WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure.
--- fs/ocfs2/cluster/tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/cluster/tcp.c +1 -1
@@ -2108,7 +2108,7 @@ int o2net_start_listening(struct o2nm_node *node)BUG_ON (o2net_listen_sock !=NULL );mlog (ML_KTHREAD ,"starting o2net thread...\n" ); - o2net_wq =create_singlethread_workqueue ("o2net" ); + o2net_wq =alloc_ordered_workqueue ("o2net" ,WQ_MEM_RECLAIM );if (o2net_wq ==NULL ) {mlog (ML_ERROR ,"unable to launch o2net thread\n" );return -ENOMEM ;/* ? */
--
2.1.4
PATCH 7/9 fs/ocfs2/super: Remove deprecated create_singlethread_workqueue
In reply to Bhaktipriya ShridharThe workqueue "ocfs2_wq" queues multiple work items viz &osb->la_enable_wq, &journal->j_recovery_work, &os->os_orphan_scan_work, &osb->osb_truncate_log_wq which require strict execution ordering. Hence, an ordered dedicated workqueue has been used.
WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure because the workqueue is being used on a memory reclaim path.
--- fs/ocfs2/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/super.c +1 -1
@@ -2330,7 +2330,7 @@ static int ocfs2_initialize_super(struct super_block *sb, }cleancache_init_shared_fs (sb); - osb->ocfs2_wq =create_singlethread_workqueue ("ocfs2_wq" ); + osb->ocfs2_wq =alloc_ordered_workqueue ("ocfs2_wq" ,WQ_MEM_RECLAIM );if (!osb->ocfs2_wq) { status = -ENOMEM ;mlog_errno (status);
--
2.1.4
PATCH 8/9 fs/ocfs2/dlm: Remove deprecated create_singlethread_workqueue
In reply to Bhaktipriya ShridharThe workqueue "dlm_worker" queues a single work item &dlm->dispatched_work and thus 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.
Since there are fixed number of work items, explicit concurrency limit is unnecessary here.
--- fs/ocfs2/dlm/dlmdomain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/dlm/dlmdomain.c +1 -1
@@ -1906,7 +1906,7 @@ static int dlm_join_domain(struct dlm_ctxt *dlm) }snprintf (wq_name,O2NM_MAX_NAME_LEN ,"dlm_wq-%s" , dlm->name); - dlm->dlm_worker =create_singlethread_workqueue (wq_name); + dlm->dlm_worker =alloc_workqueue (wq_name,WQ_MEM_RECLAIM ,0 );if (!dlm->dlm_worker) { status = -ENOMEM ;mlog_errno (status);
--
2.1.4
Re: [PATCH 8/9] fs/ocfs2/dlm: Remove deprecated create_singlethread_workqueue
Quoted 5 lines · Bhaktipriya Shridhar
The workqueue "
dlm_worker" queues a single work item&dlm->dispatched_workand thus it doesn't require execution ordering. Hence,alloc_workqueuehas been used to replace the deprecatedcreate_singlethread_workqueueinstance.
Quoted 7 lines
The
WQ_MEM_RECLAIMflag 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 <[email protected]>
For all ocfs2 patches,
Thanks.
Signature · 1 line
tejun
PATCH 9/9 fs/nfsd/nfs4callback: Remove deprecated create_singlethread_workqueue
In reply to Bhaktipriya ShridharThe workqueue "callback_wq" queues a single work item &cb->cb_work per nfsd4_callback instance and thus, 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 not been set since this is an in-kernel nfs server and isn't involved in memory reclaim operations on the local host.
Since there are fixed number of work items, explicit concurrency limit is unnecessary here.
--- fs/nfsd/nfs4callback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfs4callback.c +1 -1
@@ -1021,7 +1021,7 @@ static const struct rpc_call_ops nfsd4_cb_ops = {int nfsd4_create_callback_queue (void ) { - callback_wq =create_singlethread_workqueue ("nfsd4_callbacks" ); + callback_wq =alloc_workqueue ("nfsd4_callbacks" ,0 ,0 );if (!callback_wq)return -ENOMEM ;return 0 ;
--
2.1.4
Re: [PATCH 9/9] fs/nfsd/nfs4callback: Remove deprecated create_singlethread_workqueue
Quoted 5 lines · Bhaktipriya Shridhar
The workqueue "
callback_wq" queues a single work item&cb->cb_workpernfsd4_callbackinstance and thus, it doesn't require execution ordering. Hence,alloc_workqueuehas been used to replace the deprecatedcreate_singlethread_workqueueinstance.
Quoted 8 lines
The
WQ_MEM_RECLAIMflag has not been set since this is an in-kernel nfs server and isn't involved in memory reclaim operations on the local host.Since there are fixed number of work items, explicit concurrency limit is unnecessary here.
Signed-off-by Bhaktipriya Shridhar <[email protected]>
Thanks.
Signature · 1 line
tejun
David Howells
maintainerQuoted 8 lines · Bhaktipriya Shridhar
This patch set removes deprecated
create_singlethread_workqueueusages infs/.Bhaktipriya Shridhar (9):
fs/afs/vlocation: Remove deprecatedcreate_singlethread_workqueuefs/afs/rxrpc: Remove deprecatedcreate_singlethread_workqueuefs/afs/callback: Remove deprecatedcreate_singlethread_workqueuefs/afs/flock: Remove deprecatedcreate_singlethread_workqueue
I'm removing the workqueue in fs/afs/rxrpc.c in one of my patches. Can I take your other three AFS patches myself and leave someone else to handle the non-AFS patches?
David
Hello David,
I'll mail another patchset with AFS, ocfs2 and nfsd patches separated out.
Thanks,
Bhaktipriya
Quoted 16 lines · David Howells
Quoted 8 lines · Bhaktipriya Shridhar
This patch set removes deprecated
create_singlethread_workqueueusages infs/.Bhaktipriya Shridhar (9):
fs/afs/vlocation: Remove deprecatedcreate_singlethread_workqueuefs/afs/rxrpc: Remove deprecatedcreate_singlethread_workqueuefs/afs/callback: Remove deprecatedcreate_singlethread_workqueuefs/afs/flock: Remove deprecatedcreate_singlethread_workqueueI'm removing the workqueue in
fs/afs/rxrpc.cin one of my patches. Can I take your other three AFS patches myself and leave someone else to handle the non-AFS patches?David