]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: scsi_transport_sas: cap shost opt_sectors according to DMA optimal limit
authorJohn Garry <john.garry@huawei.com>
Thu, 14 Jul 2022 11:15:28 +0000 (19:15 +0800)
committerChristoph Hellwig <hch@lst.de>
Tue, 19 Jul 2022 09:11:49 +0000 (11:11 +0200)
commitc13476914638e441d53b41a9bd536f7d2ee662fd
treec7215db758628d553bbbede2148d449d5d54d072
parent7bd36735a7c78f8565edb0bf1f9acb059a09b64d
scsi: scsi_transport_sas: cap shost opt_sectors according to DMA optimal limit

Streaming DMA mappings may be considerably slower when mappings go through
an IOMMU and the total mapping length is somewhat long. This is because the
IOMMU IOVA code allocates and free an IOVA for each mapping, which may
affect performance.

For performance reasons set the request queue max_sectors from
dma_opt_mapping_size(), which knows this mapping limit.

Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/scsi_transport_sas.c