lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 1 Sep 2022 11:45:58 +0100
From:   John Garry <john.garry@...wei.com>
To:     Peng Zhang <zhangpeng.00@...edance.com>,
        Ethan Zhao <haifeng.zhao@...ux.intel.com>, <joro@...tes.org>,
        <will@...nel.org>
CC:     <iommu@...ts.linux.dev>, <linux-kernel@...r.kernel.org>,
        <robin.murphy@....com>
Subject: Re: [PATCH v2] iommu/iova: Optimize alloc_iova with rbtree_augmented

On 26/08/2022 11:28, Peng Zhang wrote:
> 
>> Though only 3-4 drivers use alloc_iova() directly, in my understanding
>>
>> your test has simulated the worst case, rcache doesn't work at all,
>>
>> "alloc_iova" +“remove_iova” number looks great for worst case.
> 
> There is another case, when the size to allocate greater to 2^5, even if 
> alloc_iova_fast() is used, alloc_iova() will always be called because 
> the maximum iova size that rcache supports to allocate is 32.
> IOVA_RANGE_CACHE_MAX_SIZE specifies the maximum size.
> 


If you really have a performance issue with alloc_iova_fast() -> 
alloc_iova() then I suggest that you consider trying to use 
dma_opt_mapping_size() to teach the DMA engine driver to not create 
requests whose overall size exceeds to the rcache limit.

Thanks,
John

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ