Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-11-17 Thread Ricardo Ribalda
Hi Christoph I have been testing with real hardware on arm64 your patchset. And uvc performs 20 times better using Kieran's test https://github.com/ribalda/linux/tree/uvc-noncontiguous These are the result of running yavta --capture=1000 dma_alloc_noncontiguous frames: 999 packets: 999 emp

Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-11-10 Thread Christoph Hellwig
On Tue, Nov 10, 2020 at 06:50:32PM +0900, Tomasz Figa wrote: > In what terms it doesn't actually work? Last time I checked some > platforms actually defined CONFIG_DMA_NONCOHERENT, so those would > instead use the kmalloc() + dma_map() path. I don't have any > background on why that was added and w

Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-11-10 Thread Tomasz Figa
On Tue, Nov 10, 2020 at 6:33 PM Ricardo Ribalda wrote: > > Hi Christoph > > On Tue, Nov 10, 2020 at 10:25 AM Christoph Hellwig wrote: > > > > On Mon, Nov 09, 2020 at 03:53:55PM +0100, Ricardo Ribalda wrote: > > > Hi Christoph > > > > > > I have started now to give a try to your patchset. Sorry fo

Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-11-10 Thread Christoph Hellwig
On Tue, Nov 10, 2020 at 10:33:05AM +0100, Ricardo Ribalda wrote: > Also FYI, I managed to boot an ARM device with that tree. But I could > not test the uvc driver (it was a remote device with no usb device > attached) > > Hopefully I will be able to test it for real this week. > > Any suggestions

Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-11-10 Thread Ricardo Ribalda
Hi Christoph On Tue, Nov 10, 2020 at 10:25 AM Christoph Hellwig wrote: > > On Mon, Nov 09, 2020 at 03:53:55PM +0100, Ricardo Ribalda wrote: > > Hi Christoph > > > > I have started now to give a try to your patchset. Sorry for the delay. > > > > For uvc I have prepared this patch: > > https://gith

Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-11-10 Thread Christoph Hellwig
On Mon, Nov 09, 2020 at 03:53:55PM +0100, Ricardo Ribalda wrote: > Hi Christoph > > I have started now to give a try to your patchset. Sorry for the delay. > > For uvc I have prepared this patch: > https://github.com/ribalda/linux/commit/9094fe223fe38f8c8ff21366d893b43cbbdf0113 > > I have tested

Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-11-09 Thread Ricardo Ribalda
Hi Christoph I have started now to give a try to your patchset. Sorry for the delay. For uvc I have prepared this patch: https://github.com/ribalda/linux/commit/9094fe223fe38f8c8ff21366d893b43cbbdf0113 I have tested successfully in a x86_64 noteboot..., yes I know there is no change for that pla

RE: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-10-14 Thread David Laight
> On Wed, Sep 30, 2020 at 6:09 PM Christoph Hellwig wrote: > > > > Add a new API that returns a virtually non-contigous array of pages > > and dma address. This API is only implemented for dma-iommu and will > > not be implemented for non-iommu DMA API instances that have to allocate > > contiguo

Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-10-14 Thread Tomasz Figa
+CC Ricardo who will be looking into using this in the USB stack (UVC camera driver). On Wed, Sep 30, 2020 at 6:09 PM Christoph Hellwig wrote: > > Add a new API that returns a virtually non-contigous array of pages > and dma address. This API is only implemented for dma-iommu and will > not be i

Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-10-07 Thread Christoph Hellwig
On Wed, Oct 07, 2020 at 02:21:43PM +0200, Tomasz Figa wrote: > My initial feeling is that it should work, but we'll give you a > definitive answer once we prototype it. :) > > We might actually give it a try in the USB HCD subsystem as well, to > implement usb_alloc_noncoherent(), as an optimizati

Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-10-07 Thread Tomasz Figa
On Wed, Oct 7, 2020 at 8:21 AM Christoph Hellwig wrote: > > On Tue, Oct 06, 2020 at 10:56:04PM +0200, Tomasz Figa wrote: > > > Yes. And make sure the API isn't implemented when VIVT caches are > > > used, but that isn't really different from the current interface. > > > > Okay, thanks. Let's see

Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-10-06 Thread Christoph Hellwig
On Tue, Oct 06, 2020 at 10:56:04PM +0200, Tomasz Figa wrote: > > Yes. And make sure the API isn't implemented when VIVT caches are > > used, but that isn't really different from the current interface. > > Okay, thanks. Let's see if we can make necessary changes to the videobuf2. > > +Sergey Seno

Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-10-06 Thread Tomasz Figa
On Mon, Oct 5, 2020 at 10:26 AM Christoph Hellwig wrote: > > On Fri, Oct 02, 2020 at 05:50:40PM +, Tomasz Figa wrote: > > Hi Christoph, > > > > On Wed, Sep 30, 2020 at 06:09:17PM +0200, Christoph Hellwig wrote: > > > Add a new API that returns a virtually non-contigous array of pages > > > and

Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-10-05 Thread Christoph Hellwig
On Fri, Oct 02, 2020 at 05:50:40PM +, Tomasz Figa wrote: > Hi Christoph, > > On Wed, Sep 30, 2020 at 06:09:17PM +0200, Christoph Hellwig wrote: > > Add a new API that returns a virtually non-contigous array of pages > > and dma address. This API is only implemented for dma-iommu and will > >

Re: [PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-10-02 Thread Tomasz Figa
Hi Christoph, On Wed, Sep 30, 2020 at 06:09:17PM +0200, Christoph Hellwig wrote: > Add a new API that returns a virtually non-contigous array of pages > and dma address. This API is only implemented for dma-iommu and will > not be implemented for non-iommu DMA API instances that have to allocate

[PATCH 8/8] WIP: add a dma_alloc_contiguous API

2020-09-30 Thread Christoph Hellwig
Add a new API that returns a virtually non-contigous array of pages and dma address. This API is only implemented for dma-iommu and will not be implemented for non-iommu DMA API instances that have to allocate contiguous memory. It is up to the caller to check if the API is available. The intent