Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp311743rwi; Wed, 26 Oct 2022 00:56:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6/U6UJZUmp4NyClWQYBxHhXQxGhvOYInfDf1slC9aihPshJiRAR19U0TzHuXIEreXPETSw X-Received: by 2002:a17:907:78d:b0:740:33e1:998 with SMTP id xd13-20020a170907078d00b0074033e10998mr36902679ejb.162.1666770992645; Wed, 26 Oct 2022 00:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666770992; cv=none; d=google.com; s=arc-20160816; b=p3iMjRtZ5NlYUxBwTFb7nhfVOcxlmIwaWTddXS94e7/pf0h5rEqxPUBjv1UdCwI2Dl /TwXdfd16z2P0m1uygKajHVoWoFUBMlzxsDMweLcyb/MS1a0RWCGI7r76UcmU0LAI90C GdLIbTCDpACUPsTUIvJHMex8uOBtV5Hp+Hty6ss3qp6aa1d3YAGHpIXVPblUp5KGlJsj HlL0HbbEB18Y7IdSADorsGcYsPV8J3+zCs21c1ESP+2HlijJN04BwJNwjtMT5h0cNzc5 Es2hbLnKkgHb9dnFyDZGiPXHwndGCHjFbWfqkV6Krn/UjN99sNQQcLn3kd4WFrvHSpL9 y4Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=LL3rhHTwA5hDo5o94UpXaQlhVriBWEqVsRq+1sdgGoA=; b=HXnJ9+SnoWblHunuAATcd2yIySUBMehwX5ZeTX1q4pav7Y4kyKgmhBYQMmnqlQy5Sf rdzszrPHkz7EbH6F11HaS8r7pupyEYKKxsp6FqU+cJAebTzW7co9EhenODF8r0Rj+Sew p4GlZOIOviPSXMNBWG7C1hoJsP1AqQOYBpqDRIzP1g85Km+QaKBSsVHlCGJoocxb5Ijx VgIJDzPnAJWk14W8KMpEVTbKJA1T5FD+Sk8xMTwsFOEKqT2jvMqX2Hec2T1iuXCbNu8A g3Zuj6bMC45nfGxpVNNd86kZvG/MdStN1BYw1Uk8krOC+3F9gsxzQ9T/zMaXwcA8f5P7 MxNg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hyperstone.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dn3-20020a17090794c300b0076f061ffab4si5898352ejc.51.2022.10.26.00.56.07; Wed, 26 Oct 2022 00:56:32 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hyperstone.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233163AbiJZHbH convert rfc822-to-8bit (ORCPT + 99 others); Wed, 26 Oct 2022 03:31:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233074AbiJZHa4 (ORCPT ); Wed, 26 Oct 2022 03:30:56 -0400 Received: from mail3.swissbit.com (mail3.swissbit.com [176.95.1.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4A73645E7; Wed, 26 Oct 2022 00:30:45 -0700 (PDT) Received: from mail3.swissbit.com (localhost [127.0.0.1]) by DDEI (Postfix) with ESMTP id 81D5746300B; Wed, 26 Oct 2022 09:30:43 +0200 (CEST) Received: from mail3.swissbit.com (localhost [127.0.0.1]) by DDEI (Postfix) with ESMTP id 6FF30462F57; Wed, 26 Oct 2022 09:30:43 +0200 (CEST) X-TM-AS-ERS: 10.149.2.42-127.5.254.253 X-TM-AS-SMTP: 1.0 ZXguc3dpc3NiaXQuY29t Y2xvZWhsZUBoeXBlcnN0b25lLmNvbQ== X-DDEI-TLS-USAGE: Used Received: from ex.swissbit.com (unknown [10.149.2.42]) by mail3.swissbit.com (Postfix) with ESMTPS; Wed, 26 Oct 2022 09:30:43 +0200 (CEST) Received: from sbdeex04.sbitdom.lan (10.149.2.42) by sbdeex04.sbitdom.lan (10.149.2.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.9; Wed, 26 Oct 2022 09:30:43 +0200 Received: from sbdeex04.sbitdom.lan ([fe80::2047:4968:b5a0:1818]) by sbdeex04.sbitdom.lan ([fe80::2047:4968:b5a0:1818%9]) with mapi id 15.02.1118.009; Wed, 26 Oct 2022 09:30:43 +0200 From: =?iso-8859-1?Q?Christian_L=F6hle?= To: "axboe@kernel.dk" , "ulf.hansson@linaro.org" , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" CC: Avri Altman , "adrian.hunter@intel.com" , "vincent.whitchurch@axis.com" , =?iso-8859-1?Q?Christian_L=F6hle?= Subject: [PATCH 2/3] mmc: block: Limit queue size for consecutive requeues Thread-Topic: [PATCH 2/3] mmc: block: Limit queue size for consecutive requeues Thread-Index: AdjpDFCUhEcLNslaTyCpqjy/WRFg1Q== Date: Wed, 26 Oct 2022 07:30:42 +0000 Message-ID: <3dd3f33e5cc44657bcc2ebedc6d9dd2f@hyperstone.com> Accept-Language: en-US, de-DE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.153.3.46] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-TMASE-Version: DDEI-5.1-9.0.1002-27224.006 X-TMASE-Result: 10--5.836500-10.000000 X-TMASE-MatchedRID: mIinBA9F1pwet1TxvngNgwzi9ePw0R3QajzNTFMlQCO+qOvnr0wlxY16 Nb+wd14Qbl983Sq5pJeLZQCmElUWARFCTluKaxHxTuctSpiuWyUUi4Ehat05499RlPzeVuQQghU rQpNGkuDi8zVgXoAltnS4vQrt84k3IAcCikR3vq/6y90BhXIDKmClRxG2GXwUzMjDTijVc9B9M7 imkCdZsOPwTp3D3CU0 X-TMASE-SNAP-Result: 1.821001.0001-0-1-22:0,33:0,34:0-0 X-TMASE-INERTIA: 0-0;;;; X-TMASE-XGENCLOUD: 0c6dfd2d-d8dd-4e82-a8ba-67a22aba986d-0-0-200-0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 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 --- 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