diff options
author | aszlig <aszlig@redmoonstudios.org> | 2017-06-22 06:02:15 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2017-06-22 06:08:28 +0200 |
commit | 0eaebc8518ad2f7fea4bae0ff63d91690391b4af (patch) | |
tree | 6e120d84a215cd4d4c036762e8f04ddca764cbb0 /modules | |
parent | e2d043af80227e6ab063ca91552683316ab2695a (diff) |
modules/kernel: Patch in a way to default to BFQ
The mainline kernel only allows switching schedulers via sysfs and for each individual device. I don't want to do that so let's do this with a small patch so we can set BFQ as the default blk-MQ scheduler. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/user/aszlig/system/add-default-iosched-option-for-bfq.patch | 22 | ||||
-rw-r--r-- | modules/user/aszlig/system/kernel.nix | 3 |
2 files changed, 24 insertions, 1 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 new file mode 100644 index 00000000..b5cc6cc5 --- /dev/null +++ b/modules/user/aszlig/system/add-default-iosched-option-for-bfq.patch @@ -0,0 +1,22 @@ +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/kernel.nix b/modules/user/aszlig/system/kernel.nix index 4d0a4120..c625f1e2 100644 --- a/modules/user/aszlig/system/kernel.nix +++ b/modules/user/aszlig/system/kernel.nix @@ -9,11 +9,12 @@ boot = { kernelPatches = lib.singleton { name = "bfq"; - patch = pkgs.runCommand "empty.patch" {} "touch \"$out\""; + patch = ./add-default-iosched-option-for-bfq.patch; extraConfig = '' SCSI_MQ_DEFAULT y IOSCHED_BFQ y BFQ_GROUP_IOSCHED y + DEFAULT_BFQ y DEFAULT_IOSCHED bfq ''; }; |