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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 9 Sep 2020 15:29:41 +0100
From:   Christoph Hellwig <hch@...radead.org>
To:     Jason Gunthorpe <jgg@...pe.ca>
Cc:     Christoph Hellwig <hch@...radead.org>,
        Ming Mao <maoming.maoming@...wei.com>,
        linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        linux-mm@...ck.org, alex.williamson@...hat.com,
        akpm@...ux-foundation.org, cohuck@...hat.com,
        jianjay.zhou@...wei.com, weidong.huang@...wei.com,
        peterx@...hat.com, aarcange@...hat.com, wangyunjian@...wei.com,
        willy@...radead.org, jhubbard@...dia.com
Subject: Re: [PATCH V4 1/2] vfio dma_map/unmap: optimized for hugetlbfs pages

On Wed, Sep 09, 2020 at 10:05:18AM -0300, Jason Gunthorpe wrote:
> How to use? The VMAs can have mixed page sizes so the caller would
> have to somehow switch and call twice? Not sure this is faster.

We can find out the page size based on the page.  Right now it is
rather cumbersome, but one of willys pending series has a nicer helper
for that.

> >  (2) add a bvec version of the API that returns a variable size
> >      "extent"
> 
> This is the best one, I think.. The IOMMU setup can have multiple page
> sizes, so having largest contiguous blocks pre-computed should speed
> that up.
> 
> vfio should be a win to use a sgl rather than a page list?
> 
> Especially if we can also reduce the number of pages pinned by only
> pinning head pages..

Especially for raw use of the iommu API as in vfio we don't even need
the scatterlist now, we can call ->map on each chunk.  For the DMA API
we'd kinda need it, but not for long.

> What about some 'pin_user_page_sgl' as a stepping stone?

I'd rather avoid adding new scatterlist based APIs.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ