From: Christoph Hellwig <hch@infradead.org>
To: Cai Huoqing <caihuoqing@baidu.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Michael Cyr <mikecyr@linux.ibm.com>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, target-devel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: ibmvscsi_tgt: Use dma_alloc_coherent() instead of get_zeroed_page/dma_map_single()
Date: Mon, 11 Oct 2021 08:26:04 +0100 [thread overview]
Message-ID: <YWPnDHvEVHS0JqUl@infradead.org> (raw)
In-Reply-To: <20211011070405.GA173@LAPTOP-UKSR4ENP.internal.baidu.com>
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_*.
prev parent reply other threads:[~2021-10-11 7:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-10 16:00 Cai Huoqing
2021-10-11 6:42 ` Christoph Hellwig
2021-10-11 7:04 ` Cai Huoqing
2021-10-11 7:26 ` Christoph Hellwig [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YWPnDHvEVHS0JqUl@infradead.org \
--to=hch@infradead.org \
--cc=caihuoqing@baidu.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mikecyr@linux.ibm.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome