summarylogtreecommitdiffstats
path: root/0020-ZEN-INTERACTIVE-Use-BFQ-as-our-elevator.patch
blob: fd288436c2f2a08b60663d312ec3856bd5c39c1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Mon, 27 Jan 2020 18:11:05 +0100
Subject: [PATCH] ZEN: INTERACTIVE: Use BFQ as our elevator

Add a scheduler even to multi-queue block devices: We prefer
interactivity to throughput and want BFQ if possible.
---
 block/elevator.c | 6 ++++++
 init/Kconfig     | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/block/elevator.c b/block/elevator.c
index c319765892bb90f00162cb6cac03f8d5434e64b2..062c1c055559b6a627e96031bcd9a06efa9ea85f 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -638,11 +638,17 @@ static struct elevator_type *elevator_get_default(struct request_queue *q)
 	if (q->tag_set && q->tag_set->flags & BLK_MQ_F_NO_SCHED_BY_DEFAULT)
 		return NULL;
 
+#ifndef CONFIG_ZEN_INTERACTIVE
 	if (q->nr_hw_queues != 1 &&
 	    !blk_mq_is_shared_tags(q->tag_set->flags))
 		return NULL;
+#endif
 
+#if defined(CONFIG_ZEN_INTERACTIVE) && defined(CONFIG_IOSCHED_BFQ)
+	return elevator_get(q, "bfq", false);
+#else
 	return elevator_get(q, "mq-deadline", false);
+#endif
 }
 
 /*
diff --git a/init/Kconfig b/init/Kconfig
index 40b922be8c2af3b67156290a06a92f7bd1517bab..fb5f80b921d04941aebedec13cdcbd93c5a3e76b 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -122,6 +122,10 @@ config ZEN_INTERACTIVE
 	help
 	  Tunes the kernel for responsiveness at the cost of throughput and power usage.
 
+	  --- Block Layer ----------------------------------------
+
+	    Default scheduler.........: mq-deadline -> bfq
+
 config BROKEN
 	bool