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]
Message-ID: <CALAqxLWw0k7_cB2hY=2gPbYX7omKob7eV9HJizxYCVc=n=K9EA@mail.gmail.com>
Date:   Mon, 15 Oct 2018 09:31:32 -0700
From:   John Stultz <john.stultz@...aro.org>
To:     Liam Mark <lmark@...eaurora.org>
Cc:     Laura Abbott <labbott@...hat.com>,
        lkml <linux-kernel@...r.kernel.org>,
        Beata Michalska <Beata.Michalska@....com>,
        Matt Szczesiak <matt.szczesiak@....com>,
        Anders Pedersen <Anders.Pedersen@....com>,
        John Reitan <John.Reitan@....com>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Todd Kjos <tkjos@...roid.com>,
        Martijn Coenen <maco@...roid.com>,
        dri-devel <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH] staging: ion: Rework ion_map_dma_buf() to minimize re-mapping

On Sat, Oct 13, 2018 at 11:01 PM, Liam Mark <lmark@...eaurora.org> wrote:
> On Fri, 12 Oct 2018, Laura Abbott wrote:
>> I thought there might have been some Qualcomm
>> stuff that did that (Liam? Todd?)
>
> Yes we have a form of "lazy mapping", which clients can opt into using,
> which results in iommu page table mapping not being unmaped on dma-unamp.
> Instead they are unmapped when the buffer is destroyed.
>
> It is important to note that in our "lazy mapping" implementation cache
> maintenance is still applied on dma-map and dma-unmap.
> If you need a full description of this feature I can provide it.
>
>>
>> I suspect most of the cost of the dma_map/dma_unmap is from the
>> cache flushing and not the actual mapping operations. If this
>> is the case, another option might be to figure out how to
>> incorporate dma_attrs so drivers can use DMA_ATTR_SKIP_CPU_SYNC
>> to decide when they actually want to sync.
>
> We have support for this locally on our 4.14 branch.
>
> We have added a dma_map_attrs field to the dma_buf_attachment struct,
> clients can then specify dma-attributes here such as
> DMA_ATTR_SKIP_CPU_SYNC before dma-mapping the buffer, then we ensure that
> these dma attributes are passed to dma_map_sg_attrs when ion_map_dma_buf
> is called (same for ion_unmap_dma_buf).

Do you happen to have a pointer to the tree if its public?

thanks
-john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ