aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2016-01-19 16:36:40 -0800
committerMister Oyster <oysterized@gmail.com>2017-04-11 11:00:28 +0200
commitd19b5e09d4d08b5fede9ecd58dc29e3188529e20 (patch)
tree419369598c10d079384e59dc15e1de0d48ed8eac /drivers
parent469f10ed365f5e64fa123d42c655c080da469e00 (diff)
ANDROID: mmc: move to a SCHED_FIFO thread
(cherry picked from commit 011e507b413393eab8279dac8b778ad9b6e9971b) 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 Change-Id: I1edfe73baa25e181367c30c1f40fee886e92b60d
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/card/queue.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index 67526843e..07247279d 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -18,6 +18,7 @@
#include <linux/mmc/card.h>
#include <linux/mmc/host.h>
+#include <linux/sched/rt.h>
#include "queue.h"
#include <linux/mmc/mmc.h>
#define MMC_QUEUE_BOUNCESZ 65536
@@ -49,6 +50,12 @@ 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);
+
#ifdef MMC_ENABLED_EMPTY_QUEUE_FLUSH
#define UN_FLUSHED 0
#define FLUSHING 1