Re: [PATCH] RDMA/irdma: Use dma_alloc_coherent() instead of kmalloc/dma_map_single()

From: Christoph Hellwig
Date: Mon Sep 27 2021 - 10:32:34 EST


On Mon, Sep 27, 2021 at 09:02:35AM -0300, Jason Gunthorpe wrote:
> This I'm not sure about, I see lots of calls to dma_sync_single_* for
> this memory and it is not unconditionally true that using coherent
> memory is better than doing the cache flushes. It depends very much
> on the access pattern.
>
> At the very least if you convert to coherent memory I expect to see
> the sync's removed too..

In general coherent memory actually is worse for not cache coherent
architectures when you hav chance, an should mkae no difference for
cache coherent ones. So I'd like to see numbers here instead of a
claim.