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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/15/2022 11:32 PM, Tianyu Lan wrote:
On 2/14/2022 9:58 PM, Christoph Hellwig wrote:
On Mon, Feb 14, 2022 at 07:28:40PM +0800, Tianyu Lan wrote:
On 2/14/2022 4:19 PM, Christoph Hellwig wrote:
Adding a function to set the flag doesn't really change much.  As Robin
pointed out last time you should fine a way to just call
swiotlb_init_with_tbl directly with the memory allocated the way you
like it.  Or given that we have quite a few of these trusted hypervisor
schemes maybe add an argument to swiotlb_init that specifies how to
allocate the memory.

Thanks for your suggestion. I will try the first approach first approach.

Take a look at the SWIOTLB_ANY flag in this WIP branch:

http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/swiotlb-init-cleanup

That being said I'm not sure that either this flag or the existing powerpc
code iѕ actually the right thing to do.  We still need the 4G limited
buffer to support devices with addressing limitations.  So I think we need
an additional io_tlb_mem instance for the devices without addressing
limitations instead.


Hi Christoph:
     Thanks for your patches. I tested these patches in Hyper-V trusted VM and system can't boot up. I am debugging and will report back.

Sorry. The boot failure is not related with these patches and the issue
has been fixed in the latest upstream code.

There is a performance bottleneck due to io tlb mem's spin lock during
performance test. All devices'io queues uses same io tlb mem entry
and the spin lock of io tlb mem introduce overheads. There is a fix patch from Andi Kleen in the github. Could you have a look?

https://github.com/intel/tdx/commit/4529b5784c141782c72ec9bd9a92df2b68cb7d45

Thanks.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux