mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fsverity: Remove WQ_UNBOUND from fsverity read workqueue
@ 2023-03-09 21:37 Nathan Huckleberry
  2023-03-10  5:11 ` Eric Biggers
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Huckleberry @ 2023-03-09 21:37 UTC (permalink / raw)
  Cc: Nathan Huckleberry, Eric Biggers, Theodore Y. Ts'o, fsverity,
	linux-kernel

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@google.com>
---
 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


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

end of thread, other threads:[~2023-03-10 19:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-09 21:37 [PATCH] fsverity: Remove WQ_UNBOUND from fsverity read workqueue Nathan Huckleberry
2023-03-10  5:11 ` Eric Biggers
     [not found]   ` <20230310065511.2390-1-hdanton@sina.com>
2023-03-10 19:09     ` Nathan Huckleberry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®