mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
dm-crypt: run in a WQ_HIGHPRI workqueue
Running dm-crypt 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: I589149a31c7b5d322fe2ed5b2476b1f6e3d5ee6f
This commit is contained in:
parent
495bd2da4f
commit
0b1a428a1e
1 changed files with 3 additions and 1 deletions
|
@ -1639,6 +1639,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
|
||||||
|
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
cc->io_queue = alloc_workqueue("kcryptd_io",
|
cc->io_queue = alloc_workqueue("kcryptd_io",
|
||||||
|
WQ_HIGHPRI |
|
||||||
WQ_NON_REENTRANT|
|
WQ_NON_REENTRANT|
|
||||||
WQ_MEM_RECLAIM,
|
WQ_MEM_RECLAIM,
|
||||||
1);
|
1);
|
||||||
|
@ -1648,7 +1649,8 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
cc->crypt_queue = alloc_workqueue("kcryptd",
|
cc->crypt_queue = alloc_workqueue("kcryptd",
|
||||||
WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM |
|
WQ_HIGHPRI |
|
||||||
|
WQ_MEM_RECLAIM |
|
||||||
WQ_UNBOUND, num_online_cpus());
|
WQ_UNBOUND, num_online_cpus());
|
||||||
if (!cc->crypt_queue) {
|
if (!cc->crypt_queue) {
|
||||||
ti->error = "Couldn't create kcryptd queue";
|
ti->error = "Couldn't create kcryptd queue";
|
||||||
|
|
Loading…
Reference in a new issue