55abe5f
From 223ea50950f97ed4e67311dfcffed7ffc27a7cd3 Mon Sep 17 00:00:00 2001
d7b2d46
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
d7b2d46
Date: Wed, 14 Aug 2019 15:57:42 +0200
d7b2d46
Subject: [PATCH] udev: use bfq as the default scheduler
d7b2d46
d7b2d46
As requested in https://bugzilla.redhat.com/show_bug.cgi?id=1738828.
d7b2d46
Test results are that bfq seems to behave better and more consistently on
d7b2d46
typical hardware. The kernel does not have a configuration option to set
d7b2d46
the default scheduler, and it currently needs to be set by userspace.
d7b2d46
d7b2d46
See the bug for more discussion and links.
d7b2d46
---
55abe5f
 rules.d/60-block-scheduler.rules | 5 +++++
55abe5f
 rules.d/meson.build              | 1 +
d7b2d46
 2 files changed, 6 insertions(+)
55abe5f
 create mode 100644 rules.d/60-block-scheduler.rules
d7b2d46
a746962
diff --git a/rules.d/60-block-scheduler.rules b/rules.d/60-block-scheduler.rules
d7b2d46
new file mode 100644
55abe5f
index 0000000000..480b941761
d7b2d46
--- /dev/null
a746962
+++ b/rules.d/60-block-scheduler.rules
55abe5f
@@ -0,0 +1,5 @@
d7b2d46
+# do not edit this file, it will be overwritten on update
d7b2d46
+
d7b2d46
+ACTION=="add", SUBSYSTEM=="block", \
d7b2d46
+  KERNEL=="mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|sd*[!0-9]|sr*", \
d7b2d46
+  ATTR{queue/scheduler}="bfq"
a746962
diff --git a/rules.d/meson.build b/rules.d/meson.build
55abe5f
index ca4445d774..38d6aa6970 100644
a746962
--- a/rules.d/meson.build
a746962
+++ b/rules.d/meson.build
55abe5f
@@ -3,6 +3,7 @@
d7b2d46
 rules = files('''
55abe5f
         60-autosuspend.rules
d7b2d46
         60-block.rules
d7b2d46
+        60-block-scheduler.rules
d7b2d46
         60-cdrom_id.rules
d7b2d46
         60-drm.rules
d7b2d46
         60-evdev.rules