Blame SOURCES/0089-rules-add-elevator-kernel-command-line-parameter.patch

a3e2b5
From 1255584bb0a595fb555af7e14230ab1b7aa6adcd Mon Sep 17 00:00:00 2001
a3e2b5
From: Lukas Nykryn <lnykryn@redhat.com>
a3e2b5
Date: Tue, 12 Feb 2019 16:58:16 +0100
a3e2b5
Subject: [PATCH] rules: add elevator= kernel command line parameter
a3e2b5
a3e2b5
Kernel removed the elevator= option, so let's reintroduce
a3e2b5
it for rhel8 via udev rule.
a3e2b5
a3e2b5
rhel-only
a3e2b5
Resolves: #1670126
a3e2b5
---
a3e2b5
 rules/40-elevator.rules | 20 ++++++++++++++++++++
a3e2b5
 1 file changed, 20 insertions(+)
a3e2b5
 create mode 100644 rules/40-elevator.rules
a3e2b5
a3e2b5
diff --git a/rules/40-elevator.rules b/rules/40-elevator.rules
a3e2b5
new file mode 100644
a3e2b5
index 0000000000..dbe8fc81a4
a3e2b5
--- /dev/null
a3e2b5
+++ b/rules/40-elevator.rules
a3e2b5
@@ -0,0 +1,20 @@
a3e2b5
+# We aren't adding devices skip the elevator check
a3e2b5
+ACTION!="add", GOTO="sched_out"
a3e2b5
+
a3e2b5
+SUBSYSTEM!="block", GOTO="sched_out"
a3e2b5
+ENV{DEVTYPE}!="disk", GOTO="sched_out"
a3e2b5
+
a3e2b5
+# Technically, dm-multipath can be configured to use an I/O scheduler.
a3e2b5
+# However, there are races between the 'add' uevent and the linking in
a3e2b5
+# of the queue/scheduler sysfs file.  For now, just skip dm- devices.
a3e2b5
+KERNEL=="dm-*|md*", GOTO="sched_out"
a3e2b5
+
a3e2b5
+# Skip bio-based devices, which don't support an I/O scheduler.
a3e2b5
+ATTR{queue/scheduler}=="none", GOTO="sched_out"
a3e2b5
+
a3e2b5
+# If elevator= is specified on the kernel command line, change the
a3e2b5
+# scheduler to the one specified.
a3e2b5
+IMPORT{cmdline}="elevator"
a3e2b5
+ENV{elevator}!="", ATTR{queue/scheduler}="$env{elevator}"
a3e2b5
+
a3e2b5
+LABEL="sched_out"
a3e2b5
\ No newline at end of file