Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2691382e authored by Tim Murray's avatar Tim Murray Committed by Gerrit - the friendly Code Review server
Browse files

ANDROID: dm-verity: run in a WQ_HIGHPRI workqueue



(cherry picked from commit a96fcc535ba881b4100eb2c9db8423fe7ef23422)

Running dm-verity in a standard workqueue results in IO competing for
CPU time with standard user apps, which can lead to pipeline bubbles and
seriously degraded performance. Move to a WQ_HIGHPRI workqueue to
protect against that.

Bug: 25392275

Change-Id: Idbb195b3f1c2ad446224fa870965f16d8b4b63d7
Signed-off-by: default avatarTim Murray <timmurray@google.com>
Git-commit: 8af9b174
Git-repo: https://git.linaro.org/kernel/linux-linaro-stable.git


Signed-off-by: default avatarImran Khan <kimran@codeaurora.org>
parent a619861a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1046,7 +1046,9 @@ static int verity_ctr(struct dm_target *ti, unsigned argc, char **argv)
	}

	/* WQ_UNBOUND greatly improves performance when running on ramdisk */
	v->verify_wq = alloc_workqueue("kverityd", WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM | WQ_UNBOUND, num_online_cpus());
	v->verify_wq = alloc_workqueue("kverityd",
				       WQ_HIGHPRI | WQ_MEM_RECLAIM | WQ_UNBOUND,
				       num_online_cpus());
	if (!v->verify_wq) {
		ti->error = "Cannot allocate workqueue";
		r = -ENOMEM;