linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: saeed bishara <saeed.bishara@gmail.com>
To: Dan Williams <dan.j.williams@gmail.com>,
	linux-raid@vger.kernel.org,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: RAID/dmaengine violates the dma-streaming API
Date: Sun, 17 Apr 2011 19:00:52 +0300	[thread overview]
Message-ID: <BANLkTinMA_U1r6K4t8UZKUr4nZBsWPSv9w@mail.gmail.com> (raw)

Hi,
     when md uses the dma for offloading xor and memcpy operations, it
violates the dma-mapping API.  here is the scenario I'm taking about
(under write to degraded raid5):
1. ops_run_prexor sends xor operation from buffers A and B, and the
destination is A.
2. ops_run_biodrain: sends mempcy operation from C to B.
3. ops_run_reconstruct5: sends xor operation from A and B, and the
destination is A again.

in step 1, the async tx maps A using dma_map_page, and in step 3, it
maps again the same buffer. but, if the request from step 1 still
being handled the dma engine, then we end with a case where the buffer
mapped while it still belongs to the dma hw.
when the arch is ARMv6/SMP mode (without io coherency), the cache
maintenance involves read/write access to the buffers, that means, the
second mapping above may access the buffer(with read/write) while the
dma is writing to it!!.

also, from performance sake, it would be great if this multiple
mappings get avoided.

saeed

             reply	other threads:[~2011-04-17 16:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-17 16:00 saeed bishara [this message]
2011-04-27 11:42 ` RAID/dmaengine violates the dma-streaming API saeed bishara
2011-04-27 20:20   ` Russell King - ARM Linux
2011-04-27 23:12     ` Dan Williams

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=BANLkTinMA_U1r6K4t8UZKUr4nZBsWPSv9w@mail.gmail.com \
    --to=saeed.bishara@gmail.com \
    --cc=dan.j.williams@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-raid@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;
as well as URLs for NNTP newsgroup(s).