mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Jon Masters <jonathan@jonmasters.org>
Cc: Mark Salter <msalter@redhat.com>,
	"ming.lei@canonical.com" <ming.lei@canonical.com>,
	"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/3] define ARM-specific dma_coherent_write_sync
Date: Mon, 3 Oct 2011 09:44:07 +0100	[thread overview]
Message-ID: <20111003084407.GC18195@e102109-lin.cambridge.arm.com> (raw)
In-Reply-To: <026571E7-67F6-4B0F-998C-2A845AA22E59@jonmasters.org>

On Mon, Oct 03, 2011 at 02:40:19AM +0100, Jon Masters wrote:
> On Sep 6, 2011, at 11:02 AM, Mark Salter wrote:
> > In any case, the current thinking is that the original problem with
> > the USB performance seen on cortex A9 multicore is probably something
> > more than just write buffer delays. Once the original problem is better
> > understood, we can take another look at this patch if it is still
> > needed.
> 
> Thanks again for looking into this Mark. My understanding is that this
> is still being investigated. I'll followup with ARM to see how that's
> going since I've heard nothing recently :) Meanwhile, we're continuing
> to carry a hack based on these patches in Fedora ARM kernels.

Not talking about hardware specifics here, the architecture (though
ARMv7 onwards) mandates that the write buffer is eventually drained. But
doesn't state any upper limit, so it could even be half a second.

In this case, some form of buffer draining for devices that poll the
memory may be useful. If we don't want to add a new API, something like
below would work as well:

	write to DMA buffer;
	mb();
	read from DMA buffer;

So an mb() between the last write and a subsequent read would force the
visibility of the write. We have similar scenarios for Device accesses.

If we go for a DMA API extension, the dma_coherent_write_sync() should
probably take an address as well, just in case implementations would
force the draining via some read back from the same area.

-- 
Catalin

  reply	other threads:[~2011-10-03  8:44 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-31 21:30 [PATCH 0/3] RFC: addition to DMA API Mark Salter
2011-08-31 21:30 ` [PATCH 1/3] add dma_coherent_write_sync " Mark Salter
2011-09-01  2:59   ` Josh Cartwright
2011-09-01  9:57   ` Michał Mirosław
2011-09-01 12:36     ` Mark Salter
2011-09-06 14:30       ` Catalin Marinas
2011-08-31 21:30 ` [PATCH 2/3] define ARM-specific dma_coherent_write_sync Mark Salter
2011-09-06 14:32   ` Catalin Marinas
2011-09-06 14:37     ` Mark Salter
2011-09-06 14:48       ` Catalin Marinas
2011-09-06 15:02         ` Mark Salter
2011-10-03  1:40           ` Jon Masters
2011-10-03  8:44             ` Catalin Marinas [this message]
2011-10-03  9:24               ` Jon Masters
2011-08-31 21:30 ` [PATCH 3/3] add dma_coherent_write_sync calls to USB EHCI driver Mark Salter
2011-09-01  2:33   ` Ming Lei
2011-09-01  2:09 ` [PATCH 0/3] RFC: addition to DMA API Ming Lei
2011-09-01  3:09   ` Alan Stern
2011-09-01  3:41     ` Ming Lei
2011-09-01  8:45       ` Will Deacon
2011-09-01  9:14         ` Ming Lei
2011-09-01 15:42           ` Alan Stern
2011-09-01 16:04             ` Russell King - ARM Linux
2011-09-01 17:31               ` Will Deacon
2011-09-01 18:07                 ` Russell King - ARM Linux
2011-09-01 19:14                 ` Mark Salter
2011-09-01 15:22       ` Alan Stern
2011-09-01 15:56         ` Ming Lei
2011-09-01 16:48           ` Alan Stern
2011-09-02  0:59             ` Ming Lei
2011-09-02 13:53               ` Alan Stern
2011-09-01  9:11 ` Will Deacon

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=20111003084407.GC18195@e102109-lin.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=jonathan@jonmasters.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.lei@canonical.com \
    --cc=msalter@redhat.com \
    --cc=stern@rowland.harvard.edu \
    /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

all inboxes | Powered by JetHome®