public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: John Garry <john.garry@huawei.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Christoph Hellwig <hch@lst.de>
Cc: 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: Mon, 11 Jul 2022 08:08:23 +0900	[thread overview]
Message-ID: <6367a264-a3d3-8857-9b5a-2afcd25580cb@opensource.wdc.com> (raw)
In-Reply-To: <5fd4814a-81b1-0e71-58e0-57a747eb684e@huawei.com>

On 7/9/22 01:17, John Garry wrote:
> On 07/07/2022 21:35, Martin K. Petersen wrote:
>> Christoph,
>>
>>> Yes, I've mostly been waiting for an ACK from Martin.
>> Sorry, I'm on vacation this week. The series looks OK to me although I
>> do agree that it would be great if the max was reflected in the queue's
>> hard limit and opt in the soft limit.
> 
> Ah, I think that I misunderstood Damien's question. I thought he was 
> asking why not keep shost max_sectors at dma_max_mapping_size() and then 
> init each sdev request queue max hw sectors at dma_opt_mapping_size().

I was suggesting the reverse :) Keep the device hard limit
(max_hw_sectors) to the max dma mapping and set the soft limit
(max_sectors) to the optimal dma mapping size.

> 
> But he seems that you want to know why not have the request queue max 
> sectors at dma_opt_mapping_size(). The answer is related to meaning of 
> dma_opt_mapping_size(). If we get any mappings which exceed this size 
> then it can have a big dma mapping performance hit. 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.
> 
>>
>> Acked-by: Martin K. Petersen<martin.petersen@oracle.com>
> 
> Thanks,
> John


-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2022-07-10 23:08 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 [this message]
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
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=6367a264-a3d3-8857-9b5a-2afcd25580cb@opensource.wdc.com \
    --to=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=martin.petersen@oracle.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