aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/include
diff options
context:
space:
mode:
authorGravatar Niklas Schnelle <schnelle@linux.ibm.com> 2023-09-28 16:31:40 +0200
committerGravatar Joerg Roedel <jroedel@suse.de> 2023-10-02 08:43:03 +0200
commit9f5b681e2a3f7d5bab02e68f3e68a50b23968c7c (patch)
treecadaf6afa6ae8f173e26b68fd8aee494e1503252 /arch/s390/include
parentiommu/dma: Allow a single FQ in addition to per-CPU FQs (diff)
downloadlinux-9f5b681e2a3f7d5bab02e68f3e68a50b23968c7c.tar.gz
linux-9f5b681e2a3f7d5bab02e68f3e68a50b23968c7c.tar.bz2
linux-9f5b681e2a3f7d5bab02e68f3e68a50b23968c7c.zip
iommu/dma: Use a large flush queue and timeout for shadow_on_flush
Flush queues currently use a fixed compile time size of 256 entries. This being a power of 2 allows the compiler to use shift and mask instead of more expensive modulo operations. With per-CPU flush queues larger queue sizes would hit per-CPU allocation limits, with a single flush queue these limits do not apply however. Also with single queues being particularly suitable for virtualized environments with expensive IOTLB flushes these benefit especially from larger queues and thus fewer flushes. To this end re-order struct iova_fq so we can use a dynamic array and introduce the flush queue size and timeouts as new options in the iommu_dma_options struct. So as not to lose the shift and mask optimization, use a power of 2 for the length and use explicit shift and mask instead of letting the compiler optimize this. A large queue size and 1 second timeout is then set for the shadow on flush case set by s390 paged memory guests. This then brings performance on par with the previous s390 specific DMA API implementation. Acked-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> #s390 Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Link: https://lore.kernel.org/r/20230928-dma_iommu-v13-6-9e5fc4dacc36@linux.ibm.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'arch/s390/include')
0 files changed, 0 insertions, 0 deletions