dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Kelvin.Cao@microchip.com
Cc: dmaengine@vger.kernel.org, George.Ge@microchip.com,
	linux-kernel@vger.kernel.org, logang@deltatee.com,
	christophe.jaillet@wanadoo.fr, hch@infradead.org
Subject: Re: [PATCH v6 1/1] dmaengine: switchtec-dma: Introduce Switchtec DMA engine PCI driver
Date: Wed, 11 Oct 2023 17:18:49 +0530	[thread overview]
Message-ID: <ZSaLoaenhsEG4/IP@matsya> (raw)
In-Reply-To: <1c677fbf37ac2783f864b523482d4e06d9188861.camel@microchip.com>

On 10-10-23, 21:23, Kelvin.Cao@microchip.com wrote:
> On Mon, 2023-10-09 at 11:08 +0530, Vinod Koul wrote:

> > > u64 size_to_transfer;
> > 
> > Why cant the client driver write to doorbell, is there anything which
> > prevents us from doing so?
> 
> I think the potential challenge here for the client driver to ring db
> is that the client driver (host RC) is a different requester in the
> PCIe hierarchy compared to DMA EP, in which case PCIe ordering need to
> be considered. 
> 
> As PCIe ensures that reads don't pass writes, we can insert a read DMA
> operation with DMA_PREP_FENSE flag in between the two DMA writes (one
> for data transfer and one for notification) to ensure the ordering for
> the same requester DMA EP. I'm not sure if the RC could ensure the same
> ordering if the client driver issue MMIO write to db after the data DMA
> and read DMA completion, so that the consumer is guaranteed the
> transferred data is ready in memory when the db is triggered by the
> client MMIO write. I guess it's still doable with MMIO write but just
> some special consideration needed. 

Given that it is a single value, overhead of doing a new txn would be
higher than a mmio write! I think that should be preferred

-- 
~Vinod

  reply	other threads:[~2023-10-11 11:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28 20:03 [PATCH v6 0/1] Switchtec Switch DMA Engine Driver Kelvin Cao
2023-07-28 20:03 ` [PATCH v6 1/1] dmaengine: switchtec-dma: Introduce Switchtec DMA engine PCI driver Kelvin Cao
2023-07-31  7:08   ` Christoph Hellwig
2023-07-31 23:07     ` Kelvin.Cao
2023-08-01 18:42   ` Vinod Koul
2023-08-03  3:15     ` Kelvin.Cao
2023-08-21 23:44       ` Kelvin.Cao
2023-10-05 18:35       ` Kelvin.Cao
2023-10-06 10:30         ` Vinod Koul
2023-10-06 22:34           ` Kelvin.Cao
2023-10-09  5:38             ` Vinod Koul
2023-10-10 21:23               ` Kelvin.Cao
2023-10-11 11:48                 ` Vinod Koul [this message]
2023-10-11 16:36                   ` Kelvin.Cao
2023-10-23 17:14                     ` Kelvin.Cao
2023-12-12 17:53                       ` Kelvin.Cao
2023-12-21 16:17                         ` Vinod Koul
2023-07-31 15:49 ` [PATCH v6 0/1] Switchtec Switch DMA Engine Driver Logan Gunthorpe
2023-07-31 23:07   ` Kelvin.Cao

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=ZSaLoaenhsEG4/IP@matsya \
    --to=vkoul@kernel.org \
    --cc=George.Ge@microchip.com \
    --cc=Kelvin.Cao@microchip.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=dmaengine@vger.kernel.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=logang@deltatee.com \
    /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;
as well as URLs for NNTP newsgroup(s).