mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cai Huoqing <caihuoqing@baidu.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: 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 15:04:05 +0800	[thread overview]
Message-ID: <20211011070405.GA173@LAPTOP-UKSR4ENP.internal.baidu.com> (raw)
In-Reply-To: <YWPc1GxFiOloHveI@infradead.org>

On 11 10月 21 07:42:28, Christoph Hellwig wrote:
> On Mon, Oct 11, 2021 at 12:00:53AM +0800, Cai Huoqing wrote:
> > Replacing get_zeroed_page/free_page/dma_map_single/dma_unmap_single()
> > with dma_alloc_coherent/dma_free_coherent() helps to reduce
> > code size, and simplify the code, and coherent DMA will not
> > clear the cache every time.
> 
> This explanation does not make any sense whatsoever.  Please explain
> why it would an show numbers.
Hi Christoph,
thanks for your feedback.

In this case, just simplify the code.
10 insertions(+), 31 deletions(-)

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.

thanks
Cai

  reply	other threads:[~2021-10-11  7:04 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 [this message]
2021-10-11  7:26     ` Christoph Hellwig

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=20211011070405.GA173@LAPTOP-UKSR4ENP.internal.baidu.com \
    --to=caihuoqing@baidu.com \
    --cc=hch@infradead.org \
    --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