diff options
author | chris hyser <chris.hyser@oracle.com> | 2016-09-28 22:19:50 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-06 08:44:51 +0300 |
commit | aa7bde1a8b49391d34f17905a04c3acf7770283d (patch) | |
tree | 8211bfaa3f0a1079db760f96f9d7ff277f996f62 /arch/sparc/include/asm/hypervisor.h | |
parent | 8914391b4e6517ca3dbbb975fc38ce13b0c5ee45 (diff) | |
download | linux-aa7bde1a8b49391d34f17905a04c3acf7770283d.tar.xz |
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>
Diffstat (limited to 'arch/sparc/include/asm/hypervisor.h')
-rw-r--r-- | arch/sparc/include/asm/hypervisor.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sparc/include/asm/hypervisor.h b/arch/sparc/include/asm/hypervisor.h index f5b6537306f0..666d5ba230d2 100644 --- a/arch/sparc/include/asm/hypervisor.h +++ b/arch/sparc/include/asm/hypervisor.h @@ -1744,6 +1744,7 @@ unsigned long sun4v_vintr_set_target(unsigned long dev_handle, #define HV_PCI_MAP_ATTR_READ 0x01 #define HV_PCI_MAP_ATTR_WRITE 0x02 +#define HV_PCI_MAP_ATTR_RELAXED_ORDER 0x04 #define HV_PCI_DEVICE_BUILD(b,d,f) \ ((((b) & 0xff) << 16) | \ |