lkml.org 
[lkml]   [2022]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH V3 2/2] net: netvsc: Allocate per-device swiotlb bounce buffer for netvsc
From


On 5/27/2022 2:43 AM, Dexuan Cui wrote:
>> From: Tianyu Lan <ltykernel@gmail.com>
>> Sent: Thursday, May 26, 2022 5:01 AM
>> ...
>> @@ -119,6 +124,10 @@ static void netvsc_subchan_work(struct work_struct
>> *w)
>> nvdev->max_chn = 1;
>> nvdev->num_chn = 1;
>> }
>> +
>> + /* Allocate boucne buffer.*/
>> + swiotlb_device_allocate(&hdev->device, nvdev->num_chn,
>> + 10 * IO_TLB_BLOCK_UNIT);
>> }
>
> Looks like swiotlb_device_allocate() is not called if the netvsc device
> has only 1 primary channel and no sub-schannel, e.g. in the case of
> single-vCPU VM?

When there is only sinlge,there seems not to be much performance
penalty. But you are right, we should keep the same behavior when single
CPU and multi CPU. Will update in the next version.

Thanks.

\
 
 \ /
  Last update: 2022-05-27 14:40    [W:0.028 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site