Re: [PATCH V2 1/2] Swiotlb: Add swiotlb_alloc_from_low_pages switch

From: Tianyu Lan
Date: Tue Mar 01 2022 - 09:01:41 EST


On 3/1/2022 7:53 PM, Christoph Hellwig wrote:
On Fri, Feb 25, 2022 at 10:28:54PM +0800, Tianyu Lan wrote:
One more perspective is that one device may have multiple queues and
each queues should have independent swiotlb bounce buffer to avoid spin
lock overhead. The number of queues is only available in the device
driver. This means new API needs to be called in the device driver
according to queue number.

Well, given how hell bent people are on bounce buffering we might
need some scalability work there anyway.

According to my test on the local machine with two VMs, Linux guest without swiotlb bounce buffer or with the fix patch from Andi Kleen can
achieve about 40G/s throughput but it's just 24-25G/s with current swiotlb code. Otherwise, the spinlock contention also consumes more cpu usage.