From patchwork Wed Nov 6 10:53:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 11230013 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8541B1599 for ; Wed, 6 Nov 2019 10:53:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 63019217F4 for ; Wed, 6 Nov 2019 10:53:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725868AbfKFKxm (ORCPT ); Wed, 6 Nov 2019 05:53:42 -0500 Received: from mx2.suse.de ([195.135.220.15]:43840 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729553AbfKFKxm (ORCPT ); Wed, 6 Nov 2019 05:53:42 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id EFD45AC23; Wed, 6 Nov 2019 10:53:40 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id AB5681E4862; Wed, 6 Nov 2019 11:53:40 +0100 (CET) Date: Wed, 6 Nov 2019 11:53:40 +0100 From: Jan Kara To: linux-block@vger.kernel.org Cc: mgorman@suse.de, hare@suse.de, Jens Axboe Subject: elevator= kernel argument for recent kernels Message-ID: <20191106105340.GE16085@quack2.suse.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org 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 Reviewed-by: Jeff Moyer From a012b59ada6ecbc34fe8e690abb74a2fa8a1d8e6 Mon Sep 17 00:00:00 2001 From: Jan Kara 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 --- 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