lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <3dd3f33e5cc44657bcc2ebedc6d9dd2f@hyperstone.com>
Date:   Wed, 26 Oct 2022 07:30:42 +0000
From:   Christian Löhle <CLoehle@...erstone.com>
To:     "axboe@...nel.dk" <axboe@...nel.dk>,
        "ulf.hansson@...aro.org" <ulf.hansson@...aro.org>,
        "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>
CC:     Avri Altman <Avri.Altman@....com>,
        "adrian.hunter@...el.com" <adrian.hunter@...el.com>,
        "vincent.whitchurch@...s.com" <vincent.whitchurch@...s.com>,
        Christian Löhle <CLoehle@...erstone.com>
Subject: [PATCH 2/3] mmc: block: Limit queue size for consecutive requeues

In case mmcblk relies on requeueing to fulfill block layer requests due to
hardware or driver restricting the max_blk_count to 1 also limit the
hardware queue size to 1 to get consecutive accesses instead of a
round-robin on all queued reads.

See SDHCI_QUIRK_NO_MULTIBLOCK for such a restriction.

Signed-off-by: Christian Loehle <cloehle@...erstone.com>
---
 drivers/mmc/core/queue.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c
index fefaa901b50f..3a20f3933502 100644
--- a/drivers/mmc/core/queue.c
+++ b/drivers/mmc/core/queue.c
@@ -425,6 +425,8 @@ struct gendisk *mmc_init_queue(struct mmc_queue *mq, struct mmc_card *card)
 	if (host->cqe_enabled && !host->hsq_enabled)
 		mq->tag_set.queue_depth =
 			min_t(int, card->ext_csd.cmdq_depth, host->cqe_qdepth);
+	else if (host->max_blk_count == 1)
+		mq->tag_set.queue_depth = 1;
 	else
 		mq->tag_set.queue_depth = MMC_QUEUE_DEPTH;
 	mq->tag_set.numa_node = NUMA_NO_NODE;
-- 
2.37.3

Hyperstone GmbH | Reichenaustr. 39a  | 78467 Konstanz
Managing Director: Dr. Jan Peter Berns.
Commercial register of local courts: Freiburg HRB381782

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ