[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/66] intel_iommu: Skip page walking on device iotlb invalidation
From: |
Michael S. Tsirkin |
Subject: |
[PULL 05/66] intel_iommu: Skip page walking on device iotlb invalidations |
Date: |
Tue, 8 Dec 2020 14:33:52 -0500 |
From: Eugenio Pérez <eperezma@redhat.com>
Although they didn't reach the notifier because of the filtering in
memory_region_notify_iommu_one, the vt-d was still splitting huge
memory invalidations in chunks. Skipping it.
This improves performance in case of netperf with vhost-net:
* TCP_STREAM: From 1923.6Mbit/s to 2175.13Mbit/s (13%)
* TCP_RR: From 8464.73 trans/s to 8932.703333 trans/s (5.5%)
* UDP_RR: From 8562.08 trans/s to 9005.62/s (5.1%)
* UDP_STREAM: No change observed (insignificant 0.1% improvement)
Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20201116165506.31315-5-eperezma@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/intel_iommu.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index edc3090f91..0cc71e4057 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -1478,6 +1478,10 @@ static int vtd_sync_shadow_page_table(VTDAddressSpace
*vtd_as)
VTDContextEntry ce;
IOMMUNotifier *n;
+ if (!(vtd_as->iommu.iommu_notify_flags & IOMMU_NOTIFIER_IOTLB_EVENTS)) {
+ return 0;
+ }
+
ret = vtd_dev_to_context_entry(vtd_as->iommu_state,
pci_bus_num(vtd_as->bus),
vtd_as->devfn, &ce);
--
MST
- [PULL 00/66] pc,pci,virtio: fixes, cleanups, Michael S. Tsirkin, 2020/12/08
- [PULL 04/66] memory: Add IOMMU_NOTIFIER_DEVIOTLB_UNMAP IOMMUTLBNotificationType, Michael S. Tsirkin, 2020/12/08
- [PULL 02/66] memory: Rename memory_region_notify_one to memory_region_notify_iommu_one, Michael S. Tsirkin, 2020/12/08
- [PULL 01/66] vhost-user-scsi: Fix memleaks in vus_proc_req(), Michael S. Tsirkin, 2020/12/08
- [PULL 03/66] memory: Add IOMMUTLBEvent, Michael S. Tsirkin, 2020/12/08
- [PULL 06/66] memory: Skip bad range assertion if notifier is DEVIOTLB_UNMAP type, Michael S. Tsirkin, 2020/12/08
- [PULL 05/66] intel_iommu: Skip page walking on device iotlb invalidations,
Michael S. Tsirkin <=
- [PULL 08/66] acpi/gpex: Extract two APIs from acpi_dsdt_add_pci, Michael S. Tsirkin, 2020/12/08
- [PULL 07/66] virtio: reset device on bad guest index in virtio_load(), Michael S. Tsirkin, 2020/12/08
- [PULL 09/66] fw_cfg: Refactor extra pci roots addition, Michael S. Tsirkin, 2020/12/08
- [PULL 10/66] hw/arm/virt: Write extra pci roots into fw_cfg, Michael S. Tsirkin, 2020/12/08
- [PULL 11/66] acpi: Extract crs build form acpi_build.c, Michael S. Tsirkin, 2020/12/08
- [PULL 12/66] acpi/gpex: Build tables for pxb, Michael S. Tsirkin, 2020/12/08
- [PULL 14/66] unit-test: The files changed., Michael S. Tsirkin, 2020/12/08
- [PULL 15/66] unit-test: Add testcase for pxb, Michael S. Tsirkin, 2020/12/08
- [PULL 13/66] acpi: Align the size to 128k, Michael S. Tsirkin, 2020/12/08
- [PULL 17/66] failover: fix indentantion, Michael S. Tsirkin, 2020/12/08