daandemeyer / rpms / systemd

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