From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleksandr Natalenko Subject: Re: [PATCH v2] block: BFQ default for single queue devices Date: Fri, 19 Oct 2018 11:26:37 +0200 Message-ID: <42fc6a366e88335b72517ea7d58847fd@natalenko.name> References: <20181015141059.26579-1-linus.walleij@linaro.org> <18744e21b9f5aa4b3ab721a007a3e9a2@natalenko.name> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+gldm-linux-mtd-36=gmane.org@lists.infradead.org To: Linus Walleij Cc: Jens Axboe , Christoph Hellwig , Ulf Hansson , Paolo Valente , Jan Kara , Bart Van Assche , Artem Bityutskiy , Richard Weinberger , Jonathan Corbet , linux-mmc , Adrian Hunter , linux-block , Mark Brown , linux-mtd@lists.infradead.org, Pavel Machek , Johannes Thumshirn , Damien Le Moal , One Thousand Gnomes List-Id: linux-mmc@vger.kernel.org Hi. On 19.10.2018 10:33, Linus Walleij wrote: >> > + /* >> > + * Zoned devices must use a deadline scheduler because currently >> > + * that is the only scheduler respecting zoned writes. >> > + */ >> > + if (blk_queue_is_zoned(q)) >> > + policy = "mq-deadline"; >> > + else if (IS_ENABLED(CONFIG_IOSCHED_BFQ)) >> > + policy = "bfq"; >> > + else >> > + policy = "mq-deadline"; >> >> If more rules will be needed in the future, shall we just add extra >> ifs, >> or it would be better to craft some struct/table now + policy search >> helper? > > Let's do it when it happens. Premature optimization is the root > of all evil ;) I'd say, this is a matter of code readability, not optimisations. I do not strongly object against current approach, though. -- Oleksandr Natalenko (post-factum) ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/