Re: [PATCH v1 4/4] iommu/tegra: gart: Optimize map/unmap

2018-05-07 Thread Dmitry Osipenko
On 07.05.2018 18:51, Dmitry Osipenko wrote: [snip] > Secondly, the interesting part is that mapping / unmapping of a contiguous > allocation (CMA using DMA API) is slower by ~50% then doing it for a sparse > allocation (get_pages using bare IOMMU API). /I think/ it's a shortcoming of > the >

Re: [PATCH v1 4/4] iommu/tegra: gart: Optimize map/unmap

2018-05-07 Thread Dmitry Osipenko
On 07.05.2018 11:04, Joerg Roedel wrote: > On Mon, May 07, 2018 at 12:19:01AM +0300, Dmitry Osipenko wrote: >> Probably the best variant would be to give an explicit control over syncing >> to a >> user of the IOMMU API, like for example device driver may perform multiple >> mappings / unmappings

Re: [PATCH v1 4/4] iommu/tegra: gart: Optimize map/unmap

2018-05-07 Thread Dmitry Osipenko
On 07.05.2018 10:59, Joerg Roedel wrote: > On Fri, Apr 27, 2018 at 12:02:02PM +0200, Thierry Reding wrote: >> Joerg, I've gone over the git log and header files and I see no mention >> of why the TLB flush interface isn't used for mapping. Do you recall any >> special reasons why the same

Re: [PATCH v1 4/4] iommu/tegra: gart: Optimize map/unmap

2018-05-07 Thread Joerg Roedel
On Mon, May 07, 2018 at 12:19:01AM +0300, Dmitry Osipenko wrote: > Probably the best variant would be to give an explicit control over syncing > to a > user of the IOMMU API, like for example device driver may perform multiple > mappings / unmappings and then sync/flush in the end. I'm not sure

Re: [PATCH v1 4/4] iommu/tegra: gart: Optimize map/unmap

2018-05-07 Thread Joerg Roedel
On Fri, Apr 27, 2018 at 12:02:02PM +0200, Thierry Reding wrote: > Joerg, I've gone over the git log and header files and I see no mention > of why the TLB flush interface isn't used for mapping. Do you recall any > special reasons why the same shouldn't be applied for mapping? Would you > accept

Re: [PATCH v1 4/4] iommu/tegra: gart: Optimize map/unmap

2018-05-06 Thread Dmitry Osipenko
On 27.04.2018 15:36, Robin Murphy wrote: > Hi Thierry, > > On 27/04/18 11:02, Thierry Reding wrote: >> On Mon, Apr 09, 2018 at 11:07:22PM +0300, Dmitry Osipenko wrote: >>> Currently GART writes one page entry at a time. More optimal would be to >>> aggregate the writes and flush BUS buffer in the

Re: [PATCH v1 4/4] iommu/tegra: gart: Optimize map/unmap

2018-04-27 Thread Robin Murphy
Hi Thierry, On 27/04/18 11:02, Thierry Reding wrote: On Mon, Apr 09, 2018 at 11:07:22PM +0300, Dmitry Osipenko wrote: Currently GART writes one page entry at a time. More optimal would be to aggregate the writes and flush BUS buffer in the end, this gives map/unmap 10-40% (depending on size of

Re: [PATCH v1 4/4] iommu/tegra: gart: Optimize map/unmap

2018-04-27 Thread Dmitry Osipenko
On 27.04.2018 13:02, Thierry Reding wrote: > On Mon, Apr 09, 2018 at 11:07:22PM +0300, Dmitry Osipenko wrote: >> Currently GART writes one page entry at a time. More optimal would be to >> aggregate the writes and flush BUS buffer in the end, this gives map/unmap >> 10-40% (depending on size of

Re: [PATCH v1 4/4] iommu/tegra: gart: Optimize map/unmap

2018-04-27 Thread Thierry Reding
On Mon, Apr 09, 2018 at 11:07:22PM +0300, Dmitry Osipenko wrote: > Currently GART writes one page entry at a time. More optimal would be to > aggregate the writes and flush BUS buffer in the end, this gives map/unmap > 10-40% (depending on size of mapping) performance boost compared to a >