[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YWPnDHvEVHS0JqUl@infradead.org>
Date: Mon, 11 Oct 2021 08:26:04 +0100
From: Christoph Hellwig <hch@...radead.org>
To: Cai Huoqing <caihuoqing@...du.com>
Cc: Christoph Hellwig <hch@...radead.org>,
Michael Cyr <mikecyr@...ux.ibm.com>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: ibmvscsi_tgt: Use dma_alloc_coherent() instead of
get_zeroed_page/dma_map_single()
On Mon, Oct 11, 2021 at 03:04:05PM +0800, Cai Huoqing wrote:
> dma_sync_ API is not called, I think the hardware may keep cache coherent
> directly or is a no cache system. No need to make perfermance compare.
On a device that is not attached in a cache coherent way (and that is
the only one that matters here), dma_alloc_coherent will force every
access to the memory to be uncached, while using dma_sync will only
do a cache maintainance operation for each dma submission and
completion. So yes, it matters. And Bart who has actually looked into
the number has seen the sync case to be faster consistently for a SCSI
ULP.
Note that you can simplify and improve this case by using
dma_alloc_noncoherent instead of a kernel allocator + dma_map_*.
Powered by blists - more mailing lists