From: "Ira W. Snyder" <iws@ovro.caltech.edu>
To: linuxppc-dev@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org, leoli@freescale.com,
dan.j.williams@intel.com, "Ira W. Snyder" <iws@ovro.caltech.edu>
Subject: [PATCH v2 0/9] fsldma: lockup fixes
Date: Wed, 2 Mar 2011 14:23:12 -0800 [thread overview]
Message-ID: <1299104601-15447-1-git-send-email-iws@ovro.caltech.edu> (raw)
Hello everyone,
I've been chasing random infrequent controller lockups in the fsldma driver
for a long time. I finally managed to find the problem and fix it. I'm not
quite sure about the exact sequence of events which causes the race
condition, but it is related to using the hardware registers to track the
controller state. See the patch changelogs for more detail.
The problems were quickly found by turning on DMAPOOL_DEBUG inside
mm/dmapool.c. This poisons memory allocated with the dmapool API.
With dmapool poisoning turned on, the dmatest driver would start producing
failures within a few seconds. After this patchset has been applied, I have
run several iterations of the 10 threads per channel, 100000 iterations per
thread test without any problems. I have also tested it with the CARMA
drivers (posted at linuxppc-dev previously), which make use of the external
control features.
While making the previous changes, I noticed that the fsldma driver does
not respect the automatic DMA unmapping of src and dst buffers. I have
added support for this feature. This also required a fix to dmatest, which
was sending incorrect flags.
The "support async_tx dependencies" patch could be split apart from the
automatic unmapping patch if it is desirable. They both touch the same
piece of code, so I thought it was ok to combine them. Let me know.
I would really like to see this go into 2.6.39. I think we can get it
reviewed before then. :)
Much thanks goes to Felix Radensky for testing on a P2020 (85xx DMA IP core).
I wouldn't have been able to track down the problems on 85xx without his
dilligent testing.
v1 -> v2:
- reordered patches (dmatest change is first now)
- fix problems on 85xx controller
- only set correct bits for 83xx in dma_halt()
Ira W. Snyder (9):
dmatest: fix automatic buffer unmap type
fsldma: move related helper functions near each other
fsldma: use channel name in printk output
fsldma: improve link descriptor debugging
fsldma: minor codingstyle and consistency fixes
fsldma: fix controller lockups
fsldma: support async_tx dependencies and automatic unmapping
fsldma: reduce locking during descriptor cleanup
fsldma: make halt behave nicely on all supported controllers
drivers/dma/dmatest.c | 7 +-
drivers/dma/fsldma.c | 542 +++++++++++++++++++++++++++----------------------
drivers/dma/fsldma.h | 6 +-
3 files changed, 308 insertions(+), 247 deletions(-)
--
1.7.3.4
next reply other threads:[~2011-03-02 22:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-02 22:23 Ira W. Snyder [this message]
2011-03-02 22:23 ` [PATCH v2 1/9] dmatest: fix automatic buffer unmap type Ira W. Snyder
2011-03-02 22:23 ` [PATCH v2 2/9] fsldma: move related helper functions near each other Ira W. Snyder
2011-03-02 22:23 ` [PATCH v2 3/9] fsldma: use channel name in printk output Ira W. Snyder
2011-03-02 23:17 ` Joe Perches
2011-03-02 22:23 ` [PATCH v2 4/9] fsldma: improve link descriptor debugging Ira W. Snyder
2011-03-02 22:23 ` [PATCH v2 5/9] fsldma: minor codingstyle and consistency fixes Ira W. Snyder
2011-03-02 22:23 ` [PATCH v2 6/9] fsldma: fix controller lockups Ira W. Snyder
2011-03-02 22:23 ` [PATCH v2 7/9] fsldma: support async_tx dependencies and automatic unmapping Ira W. Snyder
2011-03-02 22:23 ` [PATCH v2 8/9] fsldma: reduce locking during descriptor cleanup Ira W. Snyder
2011-03-02 22:23 ` [PATCH v2 9/9] fsldma: make halt behave nicely on all supported controllers Ira W. Snyder
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=1299104601-15447-1-git-send-email-iws@ovro.caltech.edu \
--to=iws@ovro.caltech.edu \
--cc=dan.j.williams@intel.com \
--cc=leoli@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.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
all inboxes | Powered by JetHome®