linux-erofs.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] erofs: remove WQ_CPU_INTENSIVE flag from unbound wq's
       [not found] <20200731024049.16495-1-hsiangkao.ref@aol.com>
@ 2020-07-31  2:40 ` Gao Xiang via Linux-erofs
  2020-07-31  3:48   ` Chao Yu
  0 siblings, 1 reply; 2+ messages in thread
From: Gao Xiang via Linux-erofs @ 2020-07-31  2:40 UTC (permalink / raw)
  To: linux-erofs; +Cc: LKML, Maksym Planeta

From: Gao Xiang <hsiangkao@redhat.com>

The documentation [1] says that WQ_CPU_INTENSIVE is "meaningless" for
unbound wq. I remove this flag from places where unbound queue is
allocated. This is supposed to improve code readability.

[1] https://www.kernel.org/doc/html/latest/core-api/workqueue.html#flags
Signed-off-by: Maksym Planeta <mplaneta@os.inf.tu-dresden.de>
[Gao Xiang: since the original treewide patch [2] hasn't been merged
            yet, handling the EROFS part only for the next cycle. ]
[2] https://lore.kernel.org/r/20200213141823.2174236-1-mplaneta@os.inf.tu-dresden.de
Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
---
 fs/erofs/zdata.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 80bf09c4de09..9ac2723c11bf 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -43,13 +43,13 @@ void z_erofs_exit_zip_subsystem(void)
 static inline int z_erofs_init_workqueue(void)
 {
 	const unsigned int onlinecpus = num_possible_cpus();
-	const unsigned int flags = WQ_UNBOUND | WQ_HIGHPRI | WQ_CPU_INTENSIVE;
 
 	/*
 	 * no need to spawn too many threads, limiting threads could minimum
 	 * scheduling overhead, perhaps per-CPU threads should be better?
 	 */
-	z_erofs_workqueue = alloc_workqueue("erofs_unzipd", flags,
+	z_erofs_workqueue = alloc_workqueue("erofs_unzipd",
+					    WQ_UNBOUND | WQ_HIGHPRI,
 					    onlinecpus + onlinecpus / 4);
 	return z_erofs_workqueue ? 0 : -ENOMEM;
 }
-- 
2.24.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] erofs: remove WQ_CPU_INTENSIVE flag from unbound wq's
  2020-07-31  2:40 ` [PATCH] erofs: remove WQ_CPU_INTENSIVE flag from unbound wq's Gao Xiang via Linux-erofs
@ 2020-07-31  3:48   ` Chao Yu
  0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2020-07-31  3:48 UTC (permalink / raw)
  To: Gao Xiang, linux-erofs; +Cc: LKML, Maksym Planeta

On 2020/7/31 10:40, Gao Xiang via Linux-erofs wrote:
> From: Gao Xiang <hsiangkao@redhat.com>
> 
> The documentation [1] says that WQ_CPU_INTENSIVE is "meaningless" for
> unbound wq. I remove this flag from places where unbound queue is
> allocated. This is supposed to improve code readability.
> 
> [1] https://www.kernel.org/doc/html/latest/core-api/workqueue.html#flags
> Signed-off-by: Maksym Planeta <mplaneta@os.inf.tu-dresden.de>
> [Gao Xiang: since the original treewide patch [2] hasn't been merged
>              yet, handling the EROFS part only for the next cycle. ]
> [2] https://lore.kernel.org/r/20200213141823.2174236-1-mplaneta@os.inf.tu-dresden.de
> Signed-off-by: Gao Xiang <hsiangkao@redhat.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-31  3:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200731024049.16495-1-hsiangkao.ref@aol.com>
2020-07-31  2:40 ` [PATCH] erofs: remove WQ_CPU_INTENSIVE flag from unbound wq's Gao Xiang via Linux-erofs
2020-07-31  3:48   ` Chao Yu

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).