systemd/60-io-scheduler.rules
Franck Bui 6acb16a309 Accepting request 599905 from home:fbui:systemd:Factory
- Import commit d8196805089566ecd846b7c627ff2f3c42588c50
  621b247f3 device: skip deserialization of device units when udevd is not running
  a7da5bdbc device: make sure to always retroactively start device dependencies (bsc#1088052)
  303624f6f systemd-udevd: limit children-max by available memory (#8668) (bsc#1086785 bsc#1066422)
  76acf3ae9 tmpfiles: fix directory removal with force symlink (#8619)

- Ship 99-sysctl.conf instead of creating it during package installation/update (bsc#1088769)
  Previously this symlink was created in /etc/sysctl.d during %post
  which made the symlink not owned and more importantly it was created
  only if /etc/sysctl.conf is already installed which is not always
  the case during the installation process it seems.
  So ship the symlink unconditionally and put it in /usr/lib/sysctl.d
  instead since it's a distro default behavior that might be overriden
  by sysadmin later.

- Be consistent in 60-io-scheduler.rules
  And use "?*" when checking for the non empty string (instead of "*?").

OBS-URL: https://build.opensuse.org/request/show/599905
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1027
2018-04-23 08:01:18 +00:00

25 lines
793 B
Plaintext

# Set optimal IO schedulers for HDD and SSD
ACTION!="add", GOTO="scheduler_end"
SUBSYSTEM!="block", GOTO="scheduler_end"
# Do not change scheduler if `elevator` cmdline parameter is set
IMPORT{cmdline}="elevator"
ENV{elevator}=="?*", GOTO="scheduler_end"
# Determine if BLK-MQ is enabled
TEST=="%S%p/mq", ENV{.IS_MQ}="1"
# MQ: BFQ scheduler for HDD
ENV{.IS_MQ}=="1", ATTR{queue/rotational}!="0", ATTR{queue/scheduler}="bfq"
# MQ: deadline scheduler for SSD
ENV{.IS_MQ}=="1", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="mq-deadline"
# Non-MQ: CFQ scheduler for HDD
ENV{.IS_MQ}!="1", ATTR{queue/rotational}!="0", ATTR{queue/scheduler}="cfq"
# Non-MQ: deadline scheduler for SSD
ENV{.IS_MQ}!="1", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline"
LABEL="scheduler_end"