All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Garry <john.garry@linux.dev>
To: Christoph Hellwig <hch@lst.de>, kbusch@kernel.org, ahuang12@lenovo.com
Cc: sagi@grimberg.me, linux-nvme@lists.infradead.org,
	sunjw10@lenovo.com, iommu@lists.linux.dev
Subject: Re: [PATCH] Revert "nvme-pci: clamp max_hw_sectors based on DMA optimized limitation"
Date: Thu, 8 Oct 2026 08:36:54 +0100	[thread overview]
Message-ID: <8cf8a8ea-c9c9-434b-aec6-e361280a88a4@linux.dev> (raw)
In-Reply-To: <20261006120248.147654-1-hch@lst.de>

On 10/6/26 13:02, Christoph Hellwig wrote:
> This turns down to cause up to 15% performance regressions on standard
> large transfer workloads.  Revert it and hope the IOVA allocator can
> eventually be fixed to remove the need for the original workaround.
> 
> This reverts commit 3710e2b056cb92ad816e4d79fa54a6a5b6ad8cbd.
> 

What was the block size and conditions for the original issue? The 
commit just mentions that mdts=10 and we get a 4096KB max HW sectors.

I can't find the original thread.

> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/nvme/host/pci.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 5440cf18b55b..82e308fe4f4c 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -3747,7 +3747,7 @@ static struct nvme_dev *nvme_pci_alloc_dev(struct pci_dev *pdev,
>   	 */
>   	dev->ctrl.max_hw_sectors = min_t(u32,
>   			NVME_MAX_BYTES >> SECTOR_SHIFT,
> -			dma_opt_mapping_size(&pdev->dev) >> 9);
> +			dma_max_mapping_size(&pdev->dev) >> 9);
>   	dev->ctrl.max_segments = NVME_MAX_SEGS;
>   	dev->ctrl.max_integrity_segments = 1;
>   	return dev;


  reply	other threads:[~2026-10-08  7:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06 12:02 [PATCH] Revert "nvme-pci: clamp max_hw_sectors based on DMA optimized limitation" Christoph Hellwig
2026-10-08  7:36 ` John Garry [this message]
2026-10-08 12:37   ` Christoph Hellwig
2026-10-09  9:11     ` [External] " Adrian Huang12
2026-10-09 15:37       ` Keith Busch
2026-10-12  8:42       ` John Garry
2026-10-12 12:17         ` Christoph Hellwig
2026-10-12 14:39           ` John Garry

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=8cf8a8ea-c9c9-434b-aec6-e361280a88a4@linux.dev \
    --to=john.garry@linux.dev \
    --cc=ahuang12@lenovo.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux.dev \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=sunjw10@lenovo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.