Re: [PATCH v2 0/3] add dma noncoherent API
From: Xu Yang
Date: Mon Jun 30 2025 - 03:33:14 EST
On Fri, Jun 27, 2025 at 02:25:41PM +0300, Andy Shevchenko wrote:
> On Fri, Jun 27, 2025 at 06:19:36PM +0800, Xu Yang wrote:
> > On architectures where there is no coherent caching such as ARM it's
> > proved that using dma_alloc_noncontiguous API and handling manually
>
> dma_alloc_noncontiguous()
Okay.
>
> > the cache flushing will significantly improve performance.
>
> > Refer to:
> > commit 20e1dbf2bbe2 ("media: uvcvideo: Use dma_alloc_noncontiguous API")
> > commit 68d0c3311ec1 ("media: stk1160: use dma_alloc_noncontiguous API")
> >
> > However, it's obvious that there is significant code duplication between
> > these two commits. Beside, a potential user USB Monitor may read outdated
> > data before the driver do dma sync for cpu which will make the data
>
> DMA
> CPU
Okay.
>
> > unreliable.
> >
> > To reduce code duplication and avoid USB Monitor result unreliable, this
> > series will introduce dma noncoherent API to usb core. And the USB core
>
> DMA
> USB
Okay.
Thanks,
Xu Yang
>
> > layer will manage synchronization itself.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>