Skip to content
Snippets Groups Projects
Commit 15fa9ba4 authored by Tim Murray's avatar Tim Murray
Browse files

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.

bug 25392275

Change-Id: I1edfe73baa25e181367c30c1f40fee886e92b60d
parent 954042e5
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/mmc/card.h> #include <linux/mmc/card.h>
#include <linux/mmc/host.h> #include <linux/mmc/host.h>
#include <linux/sched/rt.h>
#include "queue.h" #include "queue.h"
#define MMC_QUEUE_BOUNCESZ 65536 #define MMC_QUEUE_BOUNCESZ 65536
...@@ -59,6 +60,11 @@ static int mmc_queue_thread(void *d) ...@@ -59,6 +60,11 @@ static int mmc_queue_thread(void *d)
struct request_queue *q = mq->queue; struct request_queue *q = mq->queue;
struct mmc_card *card = mq->card; struct mmc_card *card = mq->card;
struct sched_param scheduler_params = {0};
scheduler_params.sched_priority = 1;
sched_setscheduler(current, SCHED_FIFO, &scheduler_params);
current->flags |= PF_MEMALLOC; current->flags |= PF_MEMALLOC;
if (card->host->wakeup_on_idle) if (card->host->wakeup_on_idle)
set_wake_up_idle(true); set_wake_up_idle(true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment