From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-xd42.google.com ([2607:f8b0:4864:20::d42]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gC4xw-0003rp-Sg for linux-mtd@lists.infradead.org; Mon, 15 Oct 2018 15:39:34 +0000 Received: by mail-io1-xd42.google.com with SMTP id s6-v6so3954177ioa.11 for ; Mon, 15 Oct 2018 08:39:21 -0700 (PDT) Subject: Re: [PATCH v2] block: BFQ default for single queue devices To: Linus Walleij , linux-block@vger.kernel.org Cc: linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, Pavel Machek , Paolo Valente , Ulf Hansson , Richard Weinberger , Adrian Hunter , Bart Van Assche , Jan Kara , Artem Bityutskiy , Christoph Hellwig , Alan Cox , Mark Brown , Damien Le Moal , Johannes Thumshirn , Oleksandr Natalenko , Jonathan Corbet References: <20181015141059.26579-1-linus.walleij@linaro.org> From: Jens Axboe Message-ID: Date: Mon, 15 Oct 2018 09:39:17 -0600 MIME-Version: 1.0 In-Reply-To: <20181015141059.26579-1-linus.walleij@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 10/15/18 8:10 AM, Linus Walleij wrote: > This sets BFQ as the default scheduler for single queue > block devices (nr_hw_queues == 1) if it is available. This > affects notably MMC/SD-cards but also UBI and the loopback > device. > > I have been running it for a while without any negative > effects on my pet systems and I want some wider testing > so let's throw it out there and see what people say. > Admittedly my use cases are limited. I need to keep this > patch around for my personal needs anyway. > > We take special care to avoid using BFQ on zoned devices > (in particular SMR, shingled magnetic recording devices) > as these currently require mq-deadline to group writes > together. > > I have opted against introducing any default scheduler > through Kconfig as the mq-deadline enforcement for > zoned devices has to be done at runtime anyways and > too many config options will make things confusing. > > My argument for setting a default policy in the kernel > as opposed to user space is the "reasonable defaults" > type, analogous to how we have one default CPU scheduling > policy (CFS) that make most sense for most tasks, and > how automatic process group scheduling happens in most > distributions without userspace involvement. The BFQ > scheduling policy makes most sense for single hardware > queue devices and many embedded systems will not have > the clever userspace tools (such as udev) to make an > educated choice of scheduling policy. Defaults should be > those that make most sense for the hardware. I still don't like this. There are going to be tons of cases where the single queue device is some hw raid setup or similar, where performance is going to be much worse with BFQ than it is with mq-deadline, for instance. That's just one case. This kind of policy does not belong in the kernel, at least not in the current form. If we had some sort of "enable best options for a desktop" then it could fall under that umbrella. -- Jens Axboe