Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5758582rwb; Tue, 22 Nov 2022 04:41:49 -0800 (PST) X-Google-Smtp-Source: AA0mqf5pYxjqeDoTMO/yRQUNbe7CXQVUTSnJzGeY9rmY10+0zzNIVbmqhBhqJYs4zlbtTFfhAzyh X-Received: by 2002:a65:6c11:0:b0:477:2bc0:f1b with SMTP id y17-20020a656c11000000b004772bc00f1bmr3954616pgu.566.1669120909108; Tue, 22 Nov 2022 04:41:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669120909; cv=none; d=google.com; s=arc-20160816; b=a+qnnp5GXWM57URGeO5zVZ7QCNNfEzaP/cPa22rGbDCzdT60Tupy/Fs8OH4DmSVWcN 1b0uHP6VGbT9amZRMScpzjSJvthkvETDj5wRspc7TjOn/7I6VAfvrKNwkTWnXInso/By CMCY8yddsN0RrBMNdyIg/jyNbUbGid/VkCEPYj1I02EyJLVgDA+Hq5fkZN/Eqq7aam7a TUqSBEjZqcrYArJ5sZPyHMkQd1L+xw4v1fepLduiUT2GEMQn84S3WrMLbrClFAuwHUSY uFTOvYCQZ8QmYT4pL+/5xJA5IS+dlkduacQyxtzcF/Vksr3j4X46fJD1c7UHLDd8Bxrl dm9g== 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=FHltMYzNkwz0V1KaK9N3pKbS83CaD7T+UnfPZKm5xOo=; b=VgNJ4+b7nT1NXGOxemfCgMG9tGaNXM80eNQBCe36NaL8AnhtCHHZ1DfP3JtQIXVa58 1Oo6mF0SFoS9dSsspTlcPIbsyYik1qj8RHfD8UjflehqsmjrfHd4dn+9v0RVxVno/Pxq KCGOa/HPDkYq31wD0SmlBiQugZxeQxIPEpsH2DoEDMShwiZISFohxCF73fK5IbZtHMa+ Yb1hqdCBYeK5WRZjcw7/H2aC58V7gEkiEMIDWywquvCCgpzFf86P4RSGQkfQlfrR5fed V9jwEGHm4DMNDQ5vwV4/TbvTUsl5fwdCVGGphqOVQ2h787Ucl3t/L2MIedxywO8eM6+R aXmw== 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 q4-20020a170902b10400b001783af487d1si12669896plr.533.2022.11.22.04.41.37; Tue, 22 Nov 2022 04:41:49 -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 S233741AbiKVMYz (ORCPT + 90 others); Tue, 22 Nov 2022 07:24:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233734AbiKVMYu (ORCPT ); Tue, 22 Nov 2022 07:24:50 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AE3B429B6; Tue, 22 Nov 2022 04:24:49 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id E1A2768D05; Tue, 22 Nov 2022 13:24:46 +0100 (CET) Date: Tue, 22 Nov 2022 13:24:46 +0100 From: Christoph Hellwig To: Jinlong Chen Cc: Christoph Hellwig , axboe@kernel.dk, 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: <20221122122446.GA5068@lst.de> References: <20221121071305.GB23882@lst.de> <6d74b4a9.5489.1849f42de2d.Coremail.nickyc975@zju.edu.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6d74b4a9.5489.1849f42de2d.Coremail.nickyc975@zju.edu.cn> 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 Tue, Nov 22, 2022 at 08:14:30PM +0800, Jinlong Chen wrote: > Mostly failures specific to the intended io scheduler, like consuming more > resources than the old one that the system can not afford. But sure it's > rare, so do you think I should just correct the outdated document? I'd be tempted to just documented the behavior, because I think the chances are high that if switching to one schedule will fail that switching back to the old one will fail as well. I've done a quick audit of all three schedulers, and unless I missed something there are no other failure cases except for running out of memory. Maybe a printk to document that switching the scheduler failed are we aren't using any scheduler now might be useful, though.