about summary refs log tree commit diff
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2017-07-06 00:37:49 +0200
committeraszlig <aszlig@redmoonstudios.org>2017-07-06 00:41:36 +0200
commitd1e8f105cdb6e8e9449bbef4459d9dd0fd745065 (patch)
treed3a1eab8408ff7bb4799451f4ae96a8ff2387c39
parent03063098c83ea99764474f1acb057c1a1feb6613 (diff)
modules/kernel: Really enable BFQ by default
I previously wrote that patch in a hurry, so I thought it would be
enough to set CONFIG_DEFAULT_IOSCHED to "bfq". But in block/elevator.c
the actual default for blk-mq is a constant and can't be configured via
CONFIG_DEFAULT_IOSCHED.

So we're now patching just that constant and nothing more.

Also, I've enabled CONFIG_DM_MQ_DEFAULT, because the DM devices need to
be switched to blk-mq as well and for example on dnyarri I'm actually
using the device mapper for LUKS.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
-rw-r--r--modules/user/aszlig/system/add-default-iosched-option-for-bfq.patch22
-rw-r--r--modules/user/aszlig/system/bfq-by-default.patch13
-rw-r--r--modules/user/aszlig/system/kernel.nix5
3 files changed, 15 insertions, 25 deletions
diff --git a/modules/user/aszlig/system/add-default-iosched-option-for-bfq.patch b/modules/user/aszlig/system/add-default-iosched-option-for-bfq.patch
deleted file mode 100644
index b5cc6cc5..00000000
--- a/modules/user/aszlig/system/add-default-iosched-option-for-bfq.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/block/Kconfig.iosched b/block/Kconfig.iosched
-index fd2cefa47d35..4dbabfb5265a 100644
---- a/block/Kconfig.iosched
-+++ b/block/Kconfig.iosched
-@@ -56,6 +56,9 @@ choice
- 	config DEFAULT_NOOP
- 		bool "No-op"
- 
-+	config DEFAULT_BFQ
-+		bool "BFQ" if IOSCHED_BFQ=y
-+
- endchoice
- 
- config DEFAULT_IOSCHED
-@@ -63,6 +66,7 @@ config DEFAULT_IOSCHED
- 	default "deadline" if DEFAULT_DEADLINE
- 	default "cfq" if DEFAULT_CFQ
- 	default "noop" if DEFAULT_NOOP
-+    default "bfq" if DEFAULT_BFQ
- 
- config MQ_IOSCHED_DEADLINE
- 	tristate "MQ deadline I/O scheduler"
diff --git a/modules/user/aszlig/system/bfq-by-default.patch b/modules/user/aszlig/system/bfq-by-default.patch
new file mode 100644
index 00000000..c6ee0492
--- /dev/null
+++ b/modules/user/aszlig/system/bfq-by-default.patch
@@ -0,0 +1,13 @@
+diff --git a/block/elevator.c b/block/elevator.c
+index dac99fbfc273..fbcdba53a3aa 100644
+--- a/block/elevator.c
++++ b/block/elevator.c
+@@ -229,7 +229,7 @@ int elevator_init(struct request_queue *q, char *name)
+ 		 */
+ 		if (q->mq_ops) {
+ 			if (q->nr_hw_queues == 1)
+-				e = elevator_get("mq-deadline", false);
++				e = elevator_get("bfq", false);
+ 			if (!e)
+ 				return 0;
+ 		} else
diff --git a/modules/user/aszlig/system/kernel.nix b/modules/user/aszlig/system/kernel.nix
index c625f1e2..48b2475a 100644
--- a/modules/user/aszlig/system/kernel.nix
+++ b/modules/user/aszlig/system/kernel.nix
@@ -9,13 +9,12 @@
     boot = {
       kernelPatches = lib.singleton {
         name = "bfq";
-        patch = ./add-default-iosched-option-for-bfq.patch;
+        patch = ./bfq-by-default.patch;
         extraConfig = ''
           SCSI_MQ_DEFAULT y
+          DM_MQ_DEFAULT y
           IOSCHED_BFQ y
           BFQ_GROUP_IOSCHED y
-          DEFAULT_BFQ y
-          DEFAULT_IOSCHED bfq
         '';
       };