linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: John Garry <john.garry@huawei.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Christoph Hellwig <hch@lst.de>,
	<damien.lemoal@opensource.wdc.com>, <joro@8bytes.org>,
	<will@kernel.org>, <jejb@linux.ibm.com>,
	<m.szyprowski@samsung.com>, <robin.murphy@arm.com>,
	<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-ide@vger.kernel.org>, <iommu@lists.linux-foundation.org>,
	<iommu@lists.linux.dev>, <linux-scsi@vger.kernel.org>,
	<linuxarm@huawei.com>
Subject: Re: [PATCH v5 0/5] DMA mapping changes for SCSI core
Date: Wed, 13 Jul 2022 23:10:40 -0400	[thread overview]
Message-ID: <yq135f4xul0.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <5fd4814a-81b1-0e71-58e0-57a747eb684e@huawei.com> (John Garry's message of "Fri, 8 Jul 2022 17:17:06 +0100")


John,

> So I set max hw sectors at this ‘opt’ mapping size to ensure that we
> get no mappings which exceed this size. Indeed, I think max sectors is
> 128Kb today for my host, which would be same as dma_opt_mapping_size()
> value with an IOMMU enabled. And I find that only a small % of request
> size may exceed this 128kb size, but it still has a big performance
> impact.

The purpose of the soft limit is to pick the appropriate I/O size
(i.e. for best performance). The purpose of the hard limit is to ensure
we don't submit something the hardware can't handle or describe.

IOW, the hard limit is not about performance at all. The hard limit is
mainly relevant for things that are way bigger than anything we'd issue
as regular filesystem I/O such as multi-megabyte firmware images, etc.

It's perfectly fine for firmware download performance to be
"suboptimal". What is typically more important in that scenario is that
the firmware image makes it inside a single I/O.

-- 
Martin K. Petersen	Oracle Linux Engineering

  parent reply	other threads:[~2022-07-14  3:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-30 12:08 [PATCH v5 0/5] DMA mapping changes for SCSI core John Garry
2022-06-30 12:08 ` [PATCH v5 1/5] dma-mapping: Add dma_opt_mapping_size() John Garry
2022-06-30 12:08 ` [PATCH v5 2/5] dma-iommu: Add iommu_dma_opt_mapping_size() John Garry
2022-06-30 12:08 ` [PATCH v5 3/5] scsi: core: Cap shost max_sectors according to DMA limits only once John Garry
2022-06-30 23:41   ` Damien Le Moal
2022-07-01  8:02     ` John Garry
2022-06-30 12:08 ` [PATCH v5 4/5] scsi: scsi_transport_sas: Cap shost max_sectors according to DMA optimal limit John Garry
2022-06-30 23:49   ` Damien Le Moal
2022-07-01  8:46     ` John Garry
2022-06-30 12:08 ` [PATCH v5 5/5] ata: libata-scsi: Cap ata_device->max_sectors according to shost->max_sectors John Garry
2022-07-06 13:40 ` [PATCH v5 0/5] DMA mapping changes for SCSI core John Garry
2022-07-06 13:44   ` Christoph Hellwig
2022-07-07 20:35     ` Martin K. Petersen
2022-07-08 16:17       ` John Garry
2022-07-10 23:08         ` Damien Le Moal
2022-07-11  7:36           ` John Garry
2022-07-11 10:40             ` Damien Le Moal
2022-07-11 14:49               ` John Garry
2022-07-14  3:10         ` Martin K. Petersen [this message]
2022-07-14  7:52           ` 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=yq135f4xul0.fsf@ca-mkp.ca.oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=iommu@lists.linux.dev \
    --cc=jejb@linux.ibm.com \
    --cc=john.garry@huawei.com \
    --cc=joro@8bytes.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=m.szyprowski@samsung.com \
    --cc=robin.murphy@arm.com \
    --cc=will@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).