From patchwork Wed Apr 14 11:42:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 1466157 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=ZrHU/u/N; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=TCbvszXX; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FL0zH6wdFz9sRR for ; Wed, 14 Apr 2021 21:45:47 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=xbNhaBR8+Q8qEyiR2U2FEeKGQ76c3I+v9R9mC1QnmCo=; b=ZrHU/u/N9KJknUU8f4Agyu+YvG 0k81INRgU0aHtm6V8zWn1dfg6AHIaYgPDKJqhTyOo4WagoahyhCntZXdT6JAY9IVmSGJ+h3K6Rvdb EPfZ4fCZuOH3W7lMz9XIUDU6xbldaKrssafqLe2JrY3AYOn64Un9/c89j3a4NeKXgGdK0sVEJ8HK+ akR69Et47/x2AQHTzQqtuVvusQjMXoxudj3H22bcMyDnMuExRrLAjGlOqCJ7rgW9FA1raZfBoxo8e vVGQKWuFscq/K4EiOQv/bGJ0WkkPuv9Ux+gmsB+DsIqywW3luPKfoSkqB4ky7uNY5Dp0yfszDl4UT 8P0NL/jA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWduy-00CTyE-JB; Wed, 14 Apr 2021 11:42:48 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWduo-00CTwA-R3 for openwrt-devel@lists.openwrt.org; Wed, 14 Apr 2021 11:42:42 +0000 Received: by mail-lf1-x12b.google.com with SMTP id g8so32678419lfv.12 for ; Wed, 14 Apr 2021 04:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XKVq3n8MktiVx7ghdWYEXN/yqPPtiT61Iyh0MLaT3Jw=; b=TCbvszXXmEQy/9g5H96t4gQyAfVNHnoZdDSmh8jZAaFnzwKv40LwsbVwFXYg7nVc6e wWx3keRNIvL9oN9nvRyFdKOT5WQ7YsEfZJWN3MpF5FZ/+KoWIajP7bO4e1gJVfCVv8eS Un3ACx/kovF1Yg7oN9uW0qU7QEDK1FvQT352MaLmarznRvPjMrMRe1o+UmOq/m36QEi/ 715b0u3l0uo7udxbneQY4yVRM24hNV/yCwZOLFPTjCJSVPV9KV/plGT2W98Yzd5taIJT 8FFsO19HAhrMPUDSObnxiyA46GmPrHa+kSP+Nx6DfQWIJBUxTS3EGvPSBJkwN6CEKzff TMlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=XKVq3n8MktiVx7ghdWYEXN/yqPPtiT61Iyh0MLaT3Jw=; b=ZxV3NlB3GoecKKEl54MUUAqsXdI6EqF3sgT9vugnr/jLwYH4EhuTBvLKfV5I0yowei ufaug8DhonCdqsunE0TI45VOznHXKoPPwZv26RnGtkLXHX4NMfkuRxyG+5+disW2ULI+ o02D3VcfPBbkkoJUoJlPM/Vk7KB8Ze+bSY9OoaYSAMlS5+01FAKk+p6OgR1tymK/ZwjH kvfTBeoqJ+2ucN7KPqKRfYWuTNKfZ/lUO2LXhGhCCboPVFaorEfdrvia+nNrc3YNjl7i kaZ9tptQCbIghLJNQsAVUsfCvSQax4/L4t1I9VtXD6jBI9OYWtu8jx0PsxD7TvmFUaOu NQjA== X-Gm-Message-State: AOAM530tLKsCS+L4DZNCgoddJm94DXwrvnXKs+2zzON1yYX5A1Pij0mV PY6WDswLifURhi9ocXibTG1vlGOO0GF3vA== X-Google-Smtp-Source: ABdhPJwPi9qe0/Q+FSzeY3GTp9H6SUC4Az1VGfBcNC8wUk346ibYg0WyyrgFFjjWUHpxs92bQlVROg== X-Received: by 2002:a05:6512:39cd:: with SMTP id k13mr27586955lfu.449.1618400557402; Wed, 14 Apr 2021 04:42:37 -0700 (PDT) Received: from localhost.localdomain (c-fdcc225c.014-348-6c756e10.bbcust.telenor.se. [92.34.204.253]) by smtp.gmail.com with ESMTPSA id w14sm4362789lfp.147.2021.04.14.04.42.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 04:42:37 -0700 (PDT) From: Linus Walleij To: openwrt-devel@lists.openwrt.org Cc: Linus Walleij Subject: [PATCH] RFC: kernel: Remove CFQ activate BFQ Date: Wed, 14 Apr 2021 13:42:30 +0200 Message-Id: <20210414114230.2302716-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210414_124239_594808_85CA5C42 X-CRM114-Status: GOOD ( 12.84 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The CFQ IO scheduler is deleted from the Linux kernel since commit f382fb0bcef4c37dc049e9f6963e3baf204d815c "block: remove legacy IO schedulers". The new multiqueue block layer has an IO scheduler named BFQ (Budget Fair Queue) that is suitable for slow single-queue block devices such as (S)ATA harddrives, flash memories, MMC/SD cards and USB do [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:12b listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The CFQ IO scheduler is deleted from the Linux kernel since commit f382fb0bcef4c37dc049e9f6963e3baf204d815c "block: remove legacy IO schedulers". The new multiqueue block layer has an IO scheduler named BFQ (Budget Fair Queue) that is suitable for slow single-queue block devices such as (S)ATA harddrives, flash memories, MMC/SD cards and USB dongles, so activate that instead. To actually use BFQ by default distributions such as Fedora uses this (/lib/udev/rules.d/60-block-scheduler.rules): ACTION=="add", SUBSYSTEM=="block", \ KERNEL=="mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|sd*[!0-9]|sr*", \ ATTR{queue/scheduler}="bfq" We are not using udev so we need a similar rule in a similar patch for procd, or we can patch the kernel to use BFQ by default if we do not expect people to use OpenWRT with enterprise storage arrays. Signed-off-by: Linus Walleij --- This patch is more of an RFC, I am in contact with the author of BFQ if we need to discuss its applicability for OpenWRT targets. I can make a kernel patch to make BFQ the default IO scheduler as well. --- target/linux/generic/config-5.10 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index 120d1d8c3f4a..fda3ef301dde 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -2601,8 +2601,7 @@ CONFIG_INPUT_MISC=y # CONFIG_INV_MPU6050_SPI is not set # CONFIG_IOMMU_SUPPORT is not set # CONFIG_IONIC is not set -# CONFIG_IOSCHED_BFQ is not set -# CONFIG_IOSCHED_CFQ is not set +CONFIG_IOSCHED_BFQ=y CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_NOOP=y CONFIG_IO_STRICT_DEVMEM=y