Skip to contentSkip to conversation

erofs: remove WQ_CPU_INTENSIVE flag from unbound wq's

PATCH In review Gao Xiang 2 participants 2 messages Jul 31, 2020 1 message not in the archive EROFS file system

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Gao Xiang

author
#1 lore raw

PATCH 1/1 erofs: remove WQ_CPU_INTENSIVE flag from unbound wq's

From: Gao Xiang <[email protected]>

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

[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/[email protected]

---
 fs/erofs/zdata.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/erofs/zdata.c +2 -2
index 80bf09c4de09..9ac2723c11bf 100644
@@ -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;
 }
Signature · 1 line
2.24.0
Reviewed-by on v1 1/1
#2 lore raw
Quoted 6 lines · Gao Xiang via Linux-erofs

From: Gao Xiang <[email protected]>

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.

Quoted 6 lines

[1] https://www.kernel.org/doc/html/latest/core-api/workqueue.html#flags

[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/[email protected]

Thanks,