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

Commit dcdee0d4 authored by Tim Murray's avatar Tim Murray Committed by Mark Salyzyn
Browse files

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: default avatarTim Murray <timmurray@google.com>
Bug: 25392275
Change-Id: I1edfe73baa25e181367c30c1f40fee886e92b60d
parent b99cd1c3
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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;