elevator= kernel argument for recent kernels
Hello,
with transition to blk-mq, the elevator= kernel argument was removed. I understand the reasons for its removal but still I think this may come as a surprise to some users since that argument has been there for ages and although distributions generally transition to setting appropriate elevator by udev rules, there are still people that use that argument with older kernels and there are quite a few advices on the Internet to use it. So shouldn't we at least warn loudly if someone uses elevator= argument on kernels that don't support it and redirect people to sysfs? Something like the attached patch? What do people think?
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
From a012b59ada6ecbc34fe8e690abb74a2fa8a1d8e6 Mon Sep 17 00:00:00 2001
From: Jan Kara <[email protected]>
Date: Wed, 6 Nov 2019 11:48:57 +0100
Subject: [PATCH] block: Warn if elevator= parameter is used
With transition to blk-mq, the elevator= kernel argument was removed as it makes less and less sense with the current variety of devices. Since this may surprise some users and there are advices on the Internet that still suggest to use it, let's at least warn if the parameter is used.
--- block/elevator.c | 9 +++++++++ 1 file changed, 9 insertions(+)
block/elevator.c +9 -0
@@ -831,3 +831,12 @@ struct request *elv_rb_latter_request(struct request_queue *q,return NULL ; }EXPORT_SYMBOL (elv_rb_latter_request); + +static int __init elevator_setup (char *str) +{ +pr_warn ("Kernel parameter elevator= does not have any effect anymore.\n" +"Please use sysfs to set IO scheduler for individual devices.\n" ); +return 1 ; +} + +__setup ("elevator=" , elevator_setup);
Signature · 1 line
2.16.4
Jeff Moyer
Reviewed-byQuoted 11 lines · Jan Kara
Hello,
with transition to blk-mq, the elevator= kernel argument was removed. I understand the reasons for its removal but still I think this may come as a surprise to some users since that argument has been there for ages and although distributions generally transition to setting appropriate elevator by udev rules, there are still people that use that argument with older kernels and there are quite a few advices on the Internet to use it. So shouldn't we at least warn loudly if someone uses elevator= argument on kernels that don't support it and redirect people to sysfs? Something like the attached patch? What do people think?
That's fine with me.
Jens Axboe
maintainerQuoted 11 lines · Jan Kara
Hello,
with transition to blk-mq, the elevator= kernel argument was removed. I understand the reasons for its removal but still I think this may come as a surprise to some users since that argument has been there for ages and although distributions generally transition to setting appropriate elevator by udev rules, there are still people that use that argument with older kernels and there are quite a few advices on the Internet to use it. So shouldn't we at least warn loudly if someone uses elevator= argument on kernels that don't support it and redirect people to sysfs? Something like the attached patch? What do people think?
I'm fine with that, my objects have always been centered around trying to make the parameter work. A warning makes sense to point people in the right direction. I'll add this for 5.5.
Signature · 1 line
Jens Axboe
Quoted 13 lines · Jens Axboe
Quoted 11 lines · Jan Kara
Hello,
with transition to blk-mq, the elevator= kernel argument was removed. I understand the reasons for its removal but still I think this may come as a surprise to some users since that argument has been there for ages and although distributions generally transition to setting appropriate elevator by udev rules, there are still people that use that argument with older kernels and there are quite a few advices on the Internet to use it. So shouldn't we at least warn loudly if someone uses elevator= argument on kernels that don't support it and redirect people to sysfs? Something like the attached patch? What do people think?
Quoted 3 lines
I'm fine with that, my objects have always been centered around trying to make the parameter work. A warning makes sense to point people in the right direction. I'll add this for 5.5.
Thanks!
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR