[PATCH] fsverity: Remove WQ_UNBOUND from fsverity read workqueue
From: Nathan Huckleberry
Date: Thu Mar 09 2023 - 16:38:06 EST
WQ_UNBOUND causes significant scheduler latency on ARM64/Android. This
is problematic for latency sensitive workloads like I/O post-processing.
Removing WQ_UNBOUND gives a 96% reduction in fsverity workqueue related
scheduler latency and improves app cold startup times by ~30ms.
This code was tested by running Android app startup benchmarks and
measuring how long the fsverity workqueue spent in the ready queue.
Before
Total workqueue scheduler latency: 553800us
After
Total workqueue scheduler latency: 18962us
Change-Id: I693efee541757851ed6d229430111cd763d39067
Signed-off-by: Nathan Huckleberry <nhuck@xxxxxxxxxx>
---
fs/verity/verify.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/verity/verify.c b/fs/verity/verify.c
index f50e3b5b52c9..e8ec37774d63 100644
--- a/fs/verity/verify.c
+++ b/fs/verity/verify.c
@@ -395,7 +395,7 @@ int __init fsverity_init_workqueue(void)
* which blocks reads from completing, over regular application tasks.
*/
fsverity_read_workqueue = alloc_workqueue("fsverity_read_queue",
- WQ_UNBOUND | WQ_HIGHPRI,
+ WQ_HIGHPRI,
num_online_cpus());
if (!fsverity_read_workqueue)
return -ENOMEM;
--
2.40.0.rc1.284.g88254d51c5-goog