All of lore.kernel.org
 help / color / mirror / Atom feed
* elevator= kernel argument for recent kernels
@ 2019-11-06 10:53 Jan Kara
  2019-11-06 12:55 ` Jeff Moyer
  2019-11-06 14:15 ` Jens Axboe
  0 siblings, 2 replies; 4+ messages in thread
From: Jan Kara @ 2019-11-06 10:53 UTC (permalink / raw)
  To: linux-block; +Cc: mgorman, hare, Jens Axboe

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

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

-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

[-- Attachment #2: 0001-block-Warn-if-elevator-parameter-is-used.patch --]
[-- Type: text/x-patch, Size: 1136 bytes --]

From a012b59ada6ecbc34fe8e690abb74a2fa8a1d8e6 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
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.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 block/elevator.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/block/elevator.c b/block/elevator.c
index 5437059c9261..0b1db9afb586 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -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);
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: elevator= kernel argument for recent kernels
  2019-11-06 10:53 elevator= kernel argument for recent kernels Jan Kara
@ 2019-11-06 12:55 ` Jeff Moyer
  2019-11-06 14:15 ` Jens Axboe
  1 sibling, 0 replies; 4+ messages in thread
From: Jeff Moyer @ 2019-11-06 12:55 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-block, mgorman, hare, Jens Axboe

Jan Kara <jack@suse.cz> writes:

> 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.

Reviewed-by: Jeff Moyer <jmoyer@redhat.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: elevator= kernel argument for recent kernels
  2019-11-06 10:53 elevator= kernel argument for recent kernels Jan Kara
  2019-11-06 12:55 ` Jeff Moyer
@ 2019-11-06 14:15 ` Jens Axboe
  2019-11-06 15:01   ` Jan Kara
  1 sibling, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2019-11-06 14:15 UTC (permalink / raw)
  To: Jan Kara, linux-block; +Cc: mgorman, hare

On 11/6/19 3:53 AM, Jan Kara wrote:
> 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.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: elevator= kernel argument for recent kernels
  2019-11-06 14:15 ` Jens Axboe
@ 2019-11-06 15:01   ` Jan Kara
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kara @ 2019-11-06 15:01 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Jan Kara, linux-block, mgorman, hare

On Wed 06-11-19 07:15:35, Jens Axboe wrote:
> On 11/6/19 3:53 AM, Jan Kara wrote:
> > 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.

Thanks!

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-06 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 10:53 elevator= kernel argument for recent kernels Jan Kara
2019-11-06 12:55 ` Jeff Moyer
2019-11-06 14:15 ` Jens Axboe
2019-11-06 15:01   ` Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.