Skip to contentSkip to conversation

block: deprecate choosing elevator via boot param

RFC In review Oleksandr Natalenko 2 participants 4 messages Aug 14, 2017 – Aug 30, 2017 Block layer

lore
Share & tools
lore
#0 lore raw

RFC 1/1 block: deprecate choosing elevator via boot param

Setting I/O scheduler via kernel command line is not flexible enough anymore. Different schedulers might be desirable for different types of devices (SSDs and HDDs, for instance). Moreover, setting elevator while using blk-mq framework does not work in this way already.

This commit enables warning if user specifies "elevator" boot param. Removing this option at all might be considered in some future.

---
 block/elevator.c | 3 +++
 1 file changed, 3 insertions(+)
block/elevator.c +3 -0
index 4bb2f0c93fa6..9ade7e12e417 100644
@@ -130,6 +130,9 @@ static int __init elevator_setup(char *str)
 	 * Be backwards-compatible with previous kernels, so users
 	 * won't get the wrong elevator.
 	 */
+	printk(KERN_WARNING
+		"Setting I/O scheduler via kernel command line " \
+		"is deprecated. Use udev rule instead.");
 	strncpy(chosen_elevator, str, sizeof(chosen_elevator) - 1);
 	return 1;
 }
Signature · 1 line
2.14.1
#1 lore raw

Jens,

any thoughts about this?

Quoted 31 lines · Oleksandr Natalenko

Setting I/O scheduler via kernel command line is not flexible enough anymore. Different schedulers might be desirable for different types of devices (SSDs and HDDs, for instance). Moreover, setting elevator while using blk-mq framework does not work in this way already.

This commit enables warning if user specifies "elevator" boot param. Removing this option at all might be considered in some future.

---
 block/elevator.c | 3 +++
 1 file changed, 3 insertions(+)
block/elevator.c +3 -1
index 4bb2f0c93fa6..9ade7e12e417 100644
@@ -130,6 +130,9 @@ static int __init elevator_setup(char *str)
         * Be backwards-compatible with previous kernels, so users
         * won't get the wrong elevator.
         */
+       printk(KERN_WARNING
+               "Setting I/O scheduler via kernel command line " \
+               "is deprecated. Use udev rule instead.");
        strncpy(chosen_elevator, str, sizeof(chosen_elevator) - 1);
        return 1;
 }
--

2.14.1

Signature · 3 lines
Best regards,
  Oleksandr Natalenko (post-factum)
  Software Maintenance Engineer
#2 lore raw
In reply to Oleksandr Natalenko

Jens,

any thoughts about this?

Quoted 30 lines · Oleksandr Natalenko

Setting I/O scheduler via kernel command line is not flexible enough anymore. Different schedulers might be desirable for different types of devices (SSDs and HDDs, for instance). Moreover, setting elevator while using blk-mq framework does not work in this way already.

This commit enables warning if user specifies "elevator" boot param. Removing this option at all might be considered in some future.

---
 block/elevator.c | 3 +++
 1 file changed, 3 insertions(+)
block/elevator.c +3 -1
index 4bb2f0c93fa6..9ade7e12e417 100644
@@ -130,6 +130,9 @@ static int __init elevator_setup(char *str)
         * Be backwards-compatible with previous kernels, so users
         * won't get the wrong elevator.
         */
+       printk(KERN_WARNING
+               "Setting I/O scheduler via kernel command line " \
+               "is deprecated. Use udev rule instead.");
        strncpy(chosen_elevator, str, sizeof(chosen_elevator) - 1);
        return 1;
 }
--

2.14.1

Signature · 3 lines
Best regards,
  Oleksandr Natalenko (post-factum)
  Software Maintenance Engineer
maintainer
#3 lore raw
In reply to Oleksandr Natalenko
Quoted 7 lines · Oleksandr Natalenko

Setting I/O scheduler via kernel command line is not flexible enough anymore. Different schedulers might be desirable for different types of devices (SSDs and HDDs, for instance). Moreover, setting elevator while using blk-mq framework does not work in this way already.

This commit enables warning if user specifies "elevator" boot param. Removing this option at all might be considered in some future.

Not a huge fan of doing it like this, it'll just add a bunch of noise to the dmesg output that people will ignore. It doesn't bring us closer to being able to remove the option.

I think we should just let it die over time. This will happen naturally since the blk-mq scheduling framework does not support it. Once we have everything converted, the option will end up doing nothing. Then we can eventually kill it.

Signature · 1 line
Jens Axboe