* [PATCH v2 1/4] fs/ocfs2/dlmfs: Remove deprecated create_singlethread_workqueue
[not found] <cover.1472590094.git.bhaktipriya96@gmail.com>
@ 2016-08-30 20:49 ` Bhaktipriya Shridhar
2016-08-30 20:50 ` [PATCH v2 2/4] fs/ocfs2/cluster: " Bhaktipriya Shridhar
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Bhaktipriya Shridhar @ 2016-08-30 20:49 UTC (permalink / raw)
To: Mark Fasheh, Joel Becker, Andrew Morton, Joseph Qi, xuejiufei,
Norton.Zhu, Jun Piao, David S. Miller, Eric Dumazet,
Michal Hocko, Vladimir Davydov, Johannes Weiner,
Kirill A. Shutemov
Cc: ocfs2-devel, linux-kernel, Tejun Heo
The 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.
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
fs/ocfs2/dlmfs/dlmfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
index 47b3b2d..afe6e10 100644
--- a/fs/ocfs2/dlmfs/dlmfs.c
+++ b/fs/ocfs2/dlmfs/dlmfs.c
@@ -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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/4] fs/ocfs2/cluster: Remove deprecated create_singlethread_workqueue
[not found] <cover.1472590094.git.bhaktipriya96@gmail.com>
2016-08-30 20:49 ` [PATCH v2 1/4] fs/ocfs2/dlmfs: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
@ 2016-08-30 20:50 ` Bhaktipriya Shridhar
2016-08-30 20:50 ` [PATCH v2 3/4] fs/ocfs2/super: " Bhaktipriya Shridhar
2016-08-30 20:51 ` [PATCH v2 4/4] fs/ocfs2/dlm: " Bhaktipriya Shridhar
3 siblings, 0 replies; 5+ messages in thread
From: Bhaktipriya Shridhar @ 2016-08-30 20:50 UTC (permalink / raw)
To: Mark Fasheh, Joel Becker, Andrew Morton, Joseph Qi, xuejiufei,
Norton.Zhu, Jun Piao, David S. Miller, Eric Dumazet,
Michal Hocko, Vladimir Davydov, Johannes Weiner,
Kirill A. Shutemov
Cc: ocfs2-devel, linux-kernel, Tejun Heo
The 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.
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
Changes in v2:
-No changes.
fs/ocfs2/cluster/tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
index 4238eb2..47afe9c 100644
--- a/fs/ocfs2/cluster/tcp.c
+++ b/fs/ocfs2/cluster/tcp.c
@@ -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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 3/4] fs/ocfs2/super: Remove deprecated create_singlethread_workqueue
[not found] <cover.1472590094.git.bhaktipriya96@gmail.com>
2016-08-30 20:49 ` [PATCH v2 1/4] fs/ocfs2/dlmfs: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
2016-08-30 20:50 ` [PATCH v2 2/4] fs/ocfs2/cluster: " Bhaktipriya Shridhar
@ 2016-08-30 20:50 ` Bhaktipriya Shridhar
2016-08-30 20:51 ` [PATCH v2 4/4] fs/ocfs2/dlm: " Bhaktipriya Shridhar
3 siblings, 0 replies; 5+ messages in thread
From: Bhaktipriya Shridhar @ 2016-08-30 20:50 UTC (permalink / raw)
To: Mark Fasheh, Joel Becker, Andrew Morton, Joseph Qi, xuejiufei,
Norton.Zhu, Jun Piao, David S. Miller, Eric Dumazet,
Michal Hocko, Vladimir Davydov, Johannes Weiner,
Kirill A. Shutemov
Cc: ocfs2-devel, linux-kernel, Tejun Heo
The 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.
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
Changes in v2:
-No change.
fs/ocfs2/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index d7cae33..af5285d 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 4/4] fs/ocfs2/dlm: Remove deprecated create_singlethread_workqueue
[not found] <cover.1472590094.git.bhaktipriya96@gmail.com>
` (2 preceding siblings ...)
2016-08-30 20:50 ` [PATCH v2 3/4] fs/ocfs2/super: " Bhaktipriya Shridhar
@ 2016-08-30 20:51 ` Bhaktipriya Shridhar
2016-08-31 14:31 ` Tejun Heo
3 siblings, 1 reply; 5+ messages in thread
From: Bhaktipriya Shridhar @ 2016-08-30 20:51 UTC (permalink / raw)
To: Mark Fasheh, Joel Becker, Andrew Morton, Joseph Qi, xuejiufei,
Norton.Zhu, Jun Piao, David S. Miller, Eric Dumazet,
Michal Hocko, Vladimir Davydov, Johannes Weiner,
Kirill A. Shutemov
Cc: ocfs2-devel, linux-kernel, Tejun Heo
The 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.
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
Changes in v2:
-No change
fs/ocfs2/dlm/dlmdomain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c
index 12e064b..dc30f38 100644
--- a/fs/ocfs2/dlm/dlmdomain.c
+++ b/fs/ocfs2/dlm/dlmdomain.c
@@ -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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 4/4] fs/ocfs2/dlm: Remove deprecated create_singlethread_workqueue
2016-08-30 20:51 ` [PATCH v2 4/4] fs/ocfs2/dlm: " Bhaktipriya Shridhar
@ 2016-08-31 14:31 ` Tejun Heo
0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2016-08-31 14:31 UTC (permalink / raw)
To: Bhaktipriya Shridhar
Cc: Mark Fasheh, Joel Becker, Andrew Morton, Joseph Qi, xuejiufei,
Norton.Zhu, Jun Piao, David S. Miller, Eric Dumazet,
Michal Hocko, Vladimir Davydov, Johannes Weiner,
Kirill A. Shutemov, ocfs2-devel, linux-kernel
On Wed, Aug 31, 2016 at 02:21:26AM +0530, Bhaktipriya Shridhar wrote:
> The 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.
>
> Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Just for the record,
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-08-31 14:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <cover.1472590094.git.bhaktipriya96@gmail.com>
2016-08-30 20:49 ` [PATCH v2 1/4] fs/ocfs2/dlmfs: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
2016-08-30 20:50 ` [PATCH v2 2/4] fs/ocfs2/cluster: " Bhaktipriya Shridhar
2016-08-30 20:50 ` [PATCH v2 3/4] fs/ocfs2/super: " Bhaktipriya Shridhar
2016-08-30 20:51 ` [PATCH v2 4/4] fs/ocfs2/dlm: " Bhaktipriya Shridhar
2016-08-31 14:31 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).