Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3840185rwb; Sun, 20 Nov 2022 23:28:32 -0800 (PST) X-Google-Smtp-Source: AA0mqf4mttii8tXSw2AfN/jG5svqUkfh0fqdOpSIH5tLJLkghhG6r0NEyYb2IjFLUH4VWdjdZaIU X-Received: by 2002:a17:907:8b9b:b0:7b7:90c1:8263 with SMTP id tb27-20020a1709078b9b00b007b790c18263mr165859ejc.604.1669015711769; Sun, 20 Nov 2022 23:28:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669015711; cv=none; d=google.com; s=arc-20160816; b=e3Vrka3ymBbwubmmI0CkRr5lTuXdS4TIQrFHNeFAxsegvKZ3GANU0WbEbal7bAfdUR l2OKW5ZbXpWrYhbHIOJMeOXs076fAG+D7tdQ+tmRpZOpfJehyJos0QGh0214PMM8VbES H3fLvRUe7ZmJ3Wy0/qdxyGOoTI8ay9Xez2x0cwJ6Lo16Qob6qdGW3RVjvCPE8ePGf5u8 68ecb0fzsn/g85I9sETygIhog7gbUbFgBy3fDbOOwrYZRQLqKVVVOSEhgjeN34h7NY8A ywiH5gczqBxniILi7ELir+dz5B0vxGsC+WwkW1ie4tz7BnC0T7HHBDvYQWrQn5rTWoov 8TCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=d9qqEBvuRRKUBASrRLCm0SNSaiGbeZH4WMbCCICXjs0=; b=g0Mk5IW55j3zLV3eKpNEU9HpcVdnGuVfXius8JE+4LFnOiuJbfNEjP5ye3nwocKFLm W15dYFap02md1WerSVdlLZvNVqGEu0dQqpvzWeLag9qJrBaYgYFyhRCwTbAeA8RUVNlG ti/9sZh+4ldtsRbwDujCTZDeyUwwyAIGmh7+hWG7qW19gzBRHP0V0sRxZOYiovj0h1UT fMCLyuYawveejotnYY6yAVT6FGupVWSRaHrOfq0fBsoLVrETnEVjtzTC2UMDoZ//JVSe VGNgES6+0diODvkCMAYl9K+pYaX9iUbz0z9IDRzoBWoXMXIL0zJPIMFZaEu/7m/fm43F Bcyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d4-20020aa7ce04000000b00461b93cfe9dsi8071493edv.55.2022.11.20.23.28.03; Sun, 20 Nov 2022 23:28:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229611AbiKUHNK (ORCPT + 92 others); Mon, 21 Nov 2022 02:13:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbiKUHNJ (ORCPT ); Mon, 21 Nov 2022 02:13:09 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2D0B120B9; Sun, 20 Nov 2022 23:13:08 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id BA23468AA6; Mon, 21 Nov 2022 08:13:05 +0100 (CET) Date: Mon, 21 Nov 2022 08:13:05 +0100 From: Christoph Hellwig To: Jinlong Chen Cc: axboe@kernel.dk, hch@lst.de, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/2] elevator: restore old io scheduler on failure in elevator_switch Message-ID: <20221121071305.GB23882@lst.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 18, 2022 at 08:09:52PM +0800, Jinlong Chen wrote: > elevator_switch contains the fallback logic in sq era, but it was removed > when moving to mq (commit: a1ce35fa49852db60fc6e268038530be533c5b15), > leaving the document mismatched with the behavior. As far as I can see, > restoring the old io scheduler is more reasonable than just leaving the > scheduler none, hence there is the series. What failure scenariou can you think off where switching to the intended schedule fails, but switching back to the previous one will succeed?