diff options
author | Tim Murray <timmurray@google.com> | 2016-01-19 16:36:40 -0800 |
---|---|---|
committer | Mattias Nissler <mnissler@google.com> | 2016-07-20 16:18:21 +0200 |
commit | 7d82c8373c7b4304094d2ab83b38a2bc575cb9b8 (patch) | |
tree | a2a7526d7ca992d9cdab801c7f6d098b5c2fb13f | |
parent | 42fb0043257cc3b1f5db41194feb8cd0abdd15f5 (diff) | |
download | v4.4-7d82c8373c7b4304094d2ab83b38a2bc575cb9b8.tar.gz |
ANDROID: mmc: move to a SCHED_FIFO thread
Running mmcqd as a prio 120 thread forces it to compete with standard
user processes for IO performance, especially when the system is under
severe CPU load. Move it to a SCHED_FIFO thread to reduce the impact of
load on IO performance.
Signed-off-by: Tim Murray <timmurray@google.com>
Bug: 25392275
Patchset: mmc-sched-fifo
Signed-off-by: Mattias Nissler <mnissler@google.com>
Change-Id: I5f52acdd59ffc5ed9b8a9ad23ee34bede7ac5714
-rw-r--r-- | drivers/mmc/card/queue.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index 6f4323c6d653..6a4cd2bb4629 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c @@ -19,6 +19,7 @@ #include <linux/mmc/card.h> #include <linux/mmc/host.h> +#include <linux/sched/rt.h> #include "queue.h" #define MMC_QUEUE_BOUNCESZ 65536 @@ -50,6 +51,11 @@ static int mmc_queue_thread(void *d) { struct mmc_queue *mq = d; struct request_queue *q = mq->queue; + struct sched_param scheduler_params = {0}; + + scheduler_params.sched_priority = 1; + + sched_setscheduler(current, SCHED_FIFO, &scheduler_params); current->flags |= PF_MEMALLOC; |