Skip to content

RFC swiotlb: Add child io tlb mem support

Tianyu Lan linux-hyperv linux-iommu lkml netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 RFC Latest2 patches 2 repliesIn review
  2. v2 RFC2 patches 6 repliesSuperseded
  3. v1 RFC1 patch 1 replySuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2swiotlb: Add Child IO TLB mem supportinclude/linux/swiotlb.h kernel/dma/swiotlb.c+329 -130 replies
2/2net: netvsc: Allocate per-device swiotlb bounce buffer for netvscdrivers/net/hyperv/netvsc.c+10 -02 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [RFC PATCH V3 0/2] swiotlb: Add child io tlb mem support

From: Tianyu Lan <[email protected]>

Traditionally swiotlb was not performance critical because it was only used for slow devices. But in some setups, like TDX/SEV confidential guests, all IO has to go through swiotlb. Currently swiotlb only has a single lock. Under high IO load with multiple CPUs this can lead to significant lock contention on the swiotlb lock.

This patch adds child IO TLB mem support to resolve spinlock overhead among device's queues. Each device may allocate IO tlb mem and setup child IO TLB mem according to queue number. The number child IO tlb mem maybe set up equal with device queue number and this helps to resolve swiotlb spinlock overhead among devices and queues.

introduces IO TLB Block concepts and swiotlb_device_allocate() API to allocate per-device swiotlb bounce buffer. The new API Accepts queue number as the number of child IO TLB mem to set up device's IO TLB mem.

Patch 2 calls new allocation function in the netvsc driver to resolve global spin lock issue.

Tianyu Lan (2):
swiotlb: Add Child IO TLB mem support
net: netvsc: Allocate per-device swiotlb bounce buffer for netvsc

 drivers/net/hyperv/netvsc.c |  10 ++
 include/linux/swiotlb.h     |  38 +++++
 kernel/dma/swiotlb.c        | 299 ++++++++++++++++++++++++++++++++++--
 3 files changed, 334 insertions(+), 13 deletions(-)
Signature · 6 lines
2.25.1

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu