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

Commit b4304a87 authored by Tim Murray's avatar Tim Murray Committed by Mark Salyzyn
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.

Signed-off-by: default avatarTim Murray <timmurray@google.com>
Bug: 25392275
Change-Id: Ic65d7bd6f04e4d77780119e926a50e71323575f0
parent dcdee0d4
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;