Skip to content

Commit

Permalink
rules: add elevator= kernel command line parameter
Browse files Browse the repository at this point in the history
Kernel removed the elevator= option, so let's reintroduce
it for rhel8 via udev rule.

RHEL-only: feature

Related: RHEL-40924
  • Loading branch information
lnykryn authored and jamacku committed Jun 27, 2024
1 parent d90465d commit 45768ef
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions rules.d/40-elevator.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# We aren't adding devices skip the elevator check
ACTION!="add", GOTO="sched_out"

SUBSYSTEM!="block", GOTO="sched_out"
ENV{DEVTYPE}!="disk", GOTO="sched_out"

# Technically, dm-multipath can be configured to use an I/O scheduler.
# However, there are races between the 'add' uevent and the linking in
# of the queue/scheduler sysfs file. For now, just skip dm- devices.
KERNEL=="dm-*|md*", GOTO="sched_out"

# Skip bio-based devices, which don't support an I/O scheduler.
ATTR{queue/scheduler}=="none", GOTO="sched_out"

# If elevator= is specified on the kernel command line, change the
# scheduler to the one specified.
IMPORT{cmdline}="elevator"
ENV{elevator}!="", ATTR{queue/scheduler}="$env{elevator}"

LABEL="sched_out"
1 change: 1 addition & 0 deletions rules.d/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ rules = [
[files('40-redhat-hotplug.rules',
'40-redhat-s390.rules',
'40-redhat.rules',
'40-elevator.rules',
'60-autosuspend.rules',
'60-block.rules',
'60-cdrom_id.rules',
Expand Down

0 comments on commit 45768ef

Please sign in to comment.