public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: "Christian Löhle" <CLoehle@hyperstone.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"Christoph Hellwig" <hch@lst.de>
Cc: Avri Altman <Avri.Altman@wdc.com>,
	"vincent.whitchurch@axis.com" <vincent.whitchurch@axis.com>
Subject: Re: [PATCH 2/3] mmc: block: Limit queue size for consecutive requeues
Date: Fri, 18 Nov 2022 13:32:34 +0200	[thread overview]
Message-ID: <7f887630-cdfe-dda9-c907-278a96b0650c@intel.com> (raw)
In-Reply-To: <3dd3f33e5cc44657bcc2ebedc6d9dd2f@hyperstone.com>

On 26/10/22 10:30, Christian Löhle wrote:
> 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@hyperstone.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)

I suggest adding a big comment here about why this is needed.
Perhaps like the information in your cover letter email.

> +		mq->tag_set.queue_depth = 1;
>  	else
>  		mq->tag_set.queue_depth = MMC_QUEUE_DEPTH;
>  	mq->tag_set.numa_node = NUMA_NO_NODE;


      reply	other threads:[~2022-11-18 11:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26  7:30 [PATCH 2/3] mmc: block: Limit queue size for consecutive requeues Christian Löhle
2022-11-18 11:32 ` Adrian Hunter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7f887630-cdfe-dda9-c907-278a96b0650c@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=Avri.Altman@wdc.com \
    --cc=CLoehle@hyperstone.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.whitchurch@axis.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox