about summary refs log tree commit diff
path: root/overrides/kpatches
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2014-04-22 08:24:56 +0200
committeraszlig <aszlig@redmoonstudios.org>2014-04-22 08:24:56 +0200
commit6c224e49345abeb7e4502df6d337b5127f08e5d0 (patch)
treeb7708f6625cc63013b2d05436c7891baf036b1b1 /overrides/kpatches
parent7a5bd8f2f7a40eca90976c1eaa8666ff50f063a1 (diff)
overrides: Add kernel patch for BFQ scheduler.
This contains a small sed "patch" for supporting kernel 3.15, but will
be dropped as soon as the new BFQ patches will be released for 3.15.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'overrides/kpatches')
-rw-r--r--overrides/kpatches/bfqsched.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/overrides/kpatches/bfqsched.nix b/overrides/kpatches/bfqsched.nix
new file mode 100644
index 00000000..14a33a12
--- /dev/null
+++ b/overrides/kpatches/bfqsched.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchurl }:
+
+let
+  version = "3.14.0-v7r2";
+
+  baseURL = "http://algo.ing.unimo.it/people/paolo/disk_sched/patches";
+
+  fetchPatch = { name, sha256 }: fetchurl {
+    url = "${baseURL}/${version}/${name}.patch";
+    inherit sha256;
+  };
+
+  allPatches = [
+    (fetchPatch {
+      name = "0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r2-3.14";
+      sha256 = "04vjygsg4hp81i0f78jkv51s4m7w6k3qxhrpjrasrkgyi3wxh15l";
+    })
+    (fetchPatch {
+      name = "0002-block-introduce-the-BFQ-v7r2-I-O-sched-for-3.14";
+      sha256 = "1bz6rzg2fakfhh0grpr7z0nl85bkibl6lcw4wgmh34f3kvq89gxs";
+    })
+    (fetchPatch {
+      name = "0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r2-for-3.14.0";
+      sha256 = "0dsj6hvk0dh1f3p88zyqm31sj0hczjm8k9bmsqvhn38z0c88qi8v";
+    })
+  ];
+
+  patch = stdenv.mkDerivation {
+    name = "bfqsched-${version}.patch";
+    inherit allPatches;
+    buildCommand = ''
+      sed -e 's/IS_SUBSYS_ENABLED/IS_ENABLED/' \
+          -e '/SUBSYS/s/perf/&_event/' $allPatches > "$out"
+    '';
+  };
+
+in {
+  name = "bfqsched-${version}";
+  inherit version patch;
+}