]> git.baikalelectronics.ru Git - kernel.git/commit
sparc64: Enable setting "relaxed ordering" in IOMMU mappings
authorchris hyser <chris.hyser@oracle.com>
Wed, 28 Sep 2016 19:19:50 +0000 (12:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Oct 2016 05:44:51 +0000 (01:44 -0400)
commitb97bc1543fdd7e4b071c64595a15ef5073814a5a
tree8211bfaa3f0a1079db760f96f9d7ff277f996f62
parent5af0d8cd5ee6a3c0c5317cc875bcaf2b4425aefc
sparc64: Enable setting "relaxed ordering" in IOMMU mappings

Enable relaxed ordering for memory writes in IOMMU TSB entry from
dma_4v_alloc_coherent(), dma_4v_map_page() and dma_4v_map_sg() when
dma_attrs DMA_ATTR_WEAK_ORDERING is set. This requires PCI IOMMU I/O
Translation Services version 2.0 API.

Many PCIe devices allow enabling relaxed-ordering (memory writes bypassing
other memory writes) for various DMA buffers. A notable exception is the
Mellanox mlx4 IB adapter. Due to the nature of x86 HW this appears to have
little performance impact there. On SPARC HW however, this results in major
performance degradation getting only about 3Gbps. Enabling RO in the IOMMU
entries corresponding to mlx4 data buffers increases the throughput to
about 13 Gbps.

Orabug: 19245907

Signed-off-by: Chris Hyser <chris.hyser@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/hypervisor.h
arch/sparc/kernel/pci_sun4v.c