Skip to content

iommu/iova: Implement deferred flush queue

Joerg Roedel linux-iommu lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8iommu/iova: Add flush-queue data structuresdrivers/iommu/iova.c include/linux/iova.h+80 -00 replies
2/8iommu/iova: Implement Flush-Queue ring bufferdrivers/iommu/iova.c include/linux/iova.h+89 -00 replies
3/8iommu/iova: Add flush counters to Flush-Queue implementationdrivers/iommu/iova.c include/linux/iova.h+32 -30 replies
4/8iommu/iova: Add locking to Flush-Queuesdrivers/iommu/iova.c include/linux/iova.h+12 -00 replies
5/8iommu/iova: Add flush timerdrivers/iommu/iova.c include/linux/iova.h+40 -00 replies
6/8iommu/amd: Make use of iova queue flushingdrivers/iommu/amd_iommu.c+9 -2200 replies
7/8iommu/vt-d: Allow to flush more than 4GB of device TLBsdrivers/iommu/dmar.c+1 -10 replies
8/8iommu/vt-d: Make use of iova deferred flushingdrivers/iommu/intel-iommu.c+38 -1590 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8] iommu/iova: Implement deferred flush queue

Hi,

here is an implementation of deferred flush queues in the common iova code. Some users of the iova code already implement their own flush-queues, like the AMD-Vi and Intel VT-d drivers.

The implementation adds a per-cpu ring-buffer to the iova_domain structure and adds code to maintain that ring-buffer.

A timer is also used to make sure pending entries in the ring-buffer are flushed regularily, even when the ring-buffers don't fill up.

The AMD and Intel IOMMU drivers are converted to make use of this code and their own implementations for deferred flushing are removed.

The code has been tested on an AMD and an Intel machine with network and disk IO.

Please review.

Regards,

Joerg

Joerg Roedel (8):
iommu/iova: Add flush-queue data structures iommu/iova: Implement Flush-Queue ring buffer iommu/iova: Add flush counters to Flush-Queue implementation iommu/iova: Add locking to Flush-Queues iommu/iova: Add flush timer
iommu/amd: Make use of iova queue flushing iommu/vt-d: Allow to flush more than 4GB of device TLBs iommu/vt-d: Make use of iova deferred flushing

 drivers/iommu/amd_iommu.c   | 229 ++------------------------------------------
 drivers/iommu/dmar.c        |   2 +-
 drivers/iommu/intel-iommu.c | 197 ++++++++-----------------------------
 drivers/iommu/iova.c        | 183 +++++++++++++++++++++++++++++++++++
 include/linux/iova.h        |  67 +++++++++++++
 5 files changed, 298 insertions(+), 380 deletions(-)
Signature · 1 line
2.7.4