lkml.org 
[lkml]   [2022]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V2 1/2] Swiotlb: Add swiotlb_alloc_from_low_pages switch
From
On 2/23/2022 5:46 PM, Tianyu Lan wrote:
>
>
> On 2/23/2022 12:00 AM, Christoph Hellwig wrote:
>> On Tue, Feb 22, 2022 at 11:07:19PM +0800, Tianyu Lan wrote:
>>> Thanks for your comment. That means we need to expose an
>>> swiotlb_device_init() interface to allocate bounce buffer and initialize
>>> io tlb mem entry. DMA API Current  rmem_swiotlb_device_init() only works
>>> for platform with device tree. The new API should be called in the bus
>>> driver or new DMA API. Could you check whether this is a right way
>>> before
>>> we start the work.
>>
>> Do these VMs use ACPI?  We'd probably really want some kind of higher
>> level configuration and not have the drivers request it themselves.
>
> Yes, Hyper-V isolation VM uses ACPI. Devices are enumerated via vmbus
> host and there is no child device information in ACPI table. The host
> driver seems to be the right place to call new API.

Hi Christoph:
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.

\
 
 \ /
  Last update: 2022-02-25 15:33    [W:0.122 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site