]> 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)
commit0c7e49280d2e53b32197adb22f0176685a7e3f79
treec7215db758628d553bbbede2148d449d5d54d072
parenta17ac1c7658fcb680f45aabab634b79543757962
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