diff options
author | aszlig <aszlig@redmoonstudios.org> | 2017-07-06 01:59:32 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2017-07-06 01:59:32 +0200 |
commit | a6c365df63db28eb73adb7b89250dbacb791e920 (patch) | |
tree | eec87309402f5d905528a8f4c76144ea934a51b9 /modules/user/aszlig | |
parent | d1e8f105cdb6e8e9449bbef4459d9dd0fd745065 (diff) |
modules: Move BFQ stuff into its dedicated module
Not everybody likes to have the latest release canidate kernel, so we now have an option called vuizvui.system.kernel.bfq.enable, which *only* enables the BFQ scheduler per default. Signed-off-by: aszlig <aszlig@redmoonstudios.org> Cc: @devhell
Diffstat (limited to 'modules/user/aszlig')
-rw-r--r-- | modules/user/aszlig/system/bfq-by-default.patch | 13 | ||||
-rw-r--r-- | modules/user/aszlig/system/kernel.nix | 29 |
2 files changed, 9 insertions, 33 deletions
diff --git a/modules/user/aszlig/system/bfq-by-default.patch b/modules/user/aszlig/system/bfq-by-default.patch deleted file mode 100644 index c6ee0492..00000000 --- a/modules/user/aszlig/system/bfq-by-default.patch +++ /dev/null @@ -1,13 +0,0 @@ -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 48b2475a..c8531e30 100644 --- a/modules/user/aszlig/system/kernel.nix +++ b/modules/user/aszlig/system/kernel.nix @@ -6,26 +6,15 @@ }; config = lib.mkIf config.vuizvui.user.aszlig.system.kernel.enable { - boot = { - kernelPatches = lib.singleton { - name = "bfq"; - patch = ./bfq-by-default.patch; - extraConfig = '' - SCSI_MQ_DEFAULT y - DM_MQ_DEFAULT y - IOSCHED_BFQ y - BFQ_GROUP_IOSCHED y - ''; - }; + vuizvui.system.kernel.bfq.enable = true; - kernelPackages = let - inherit (lib) take splitString replaceStrings; - inherit (pkgs) linux_latest linux_testing; - dotizeVer = replaceStrings ["-"] ["."]; - trimVer = ver: take 2 (splitString "." (dotizeVer ver)); - tooOld = trimVer linux_latest.version == trimVer linux_testing.version; - kernel = if tooOld then linux_latest else linux_testing; - in pkgs.linuxPackagesFor kernel; - }; + boot.kernelPackages = let + inherit (lib) take splitString replaceStrings; + inherit (pkgs) linux_latest linux_testing; + dotizeVer = replaceStrings ["-"] ["."]; + trimVer = ver: take 2 (splitString "." (dotizeVer ver)); + tooOld = trimVer linux_latest.version == trimVer linux_testing.version; + kernel = if tooOld then linux_latest else linux_testing; + in pkgs.linuxPackagesFor kernel; }; } |