summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2016-01-19 16:35:17 -0800
committerMark Salyzyn <salyzyn@google.com>2016-02-22 10:44:24 -0800
commitb4304a87afed66ddb1e24bbd56fef201074d7bc7 (patch)
treed8c0c7c2b5ced4d6b77fd6ddd31c4bbf06a18188
parentdcdee0d4b76898d13f4979445d77bdcff0641d95 (diff)
downloadcommon-b4304a87afed66ddb1e24bbd56fef201074d7bc7.tar.gz
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: Tim Murray <timmurray@google.com> Bug: 25392275 Change-Id: Ic65d7bd6f04e4d77780119e926a50e71323575f0
-rw-r--r--drivers/md/dm-verity-target.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c
index 4258e175513d..185b265a9180 100644
--- a/drivers/md/dm-verity-target.c
+++ b/drivers/md/dm-verity-target.c
@@ -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;