From: "Ira W. Snyder" <iws@ovro.caltech.edu>
To: Dan Williams <dan.j.williams@intel.com>
Cc: "R58472@freescale.com" <R58472@freescale.com>,
"B04825@freescale.com" <B04825@freescale.com>,
"linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>,
"scottwood@freescale.com" <scottwood@freescale.com>,
"Dipen.Dudhat@freescale.com" <Dipen.Dudhat@freescale.com>,
"Maneesh.Gupta@freescale.com" <Maneesh.Gupta@freescale.com>,
"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>
Subject: Re: [PATCH 8/8] fsldma: major cleanups and fixes
Date: Tue, 2 Feb 2010 13:16:57 -0800 [thread overview]
Message-ID: <20100202211656.GA2609@ovro.caltech.edu> (raw)
In-Reply-To: <4B6892F4.9070906@intel.com>
On Tue, Feb 02, 2010 at 02:02:44PM -0700, Dan Williams wrote:
> Ira W. Snyder wrote:
> > Fix locking. Use two queues in the driver, one for pending transacions, and
> > one for transactions which are actually running on the hardware. Call
> > dma_run_dependencies() on descriptor cleanup so that the async_tx API works
> > correctly.
>
> I notice that fsldma diverges from other dma drivers in that the
> callback is performed with interrupts disabled. MD/raid5 currently
> assumes that interrupts are enabled in its callback routines (see
> ops_complete_biofill()'s use of spin_lock_irq()). On top of these
> changes can we align fsldma to the other raid offload drivers (mv_xor,
> iop-adma, ioatdma) and provide callbacks with irq's enabled?
>
> I'll proceed with applying these patches as they obviously improve
> things, but you will hit the irq problem when performing reads to a
> degraded array.
>
In the fsldma driver, all callbacks are run from tasklet (softirq)
context. That's under local_irq_disable(), right? Hardirq's certainly
aren't disabled there.
Is a DMAEngine user expected to call the device_is_tx_complete()
function until it returns that the DMA has completed?
If so, it is pretty easy to switch to a workqueue instead of a tasklet
to handle the callbacks. The cost is increased latency until the
callbacks are processed.
Would you want a driver-wide singlethreaded workqueue? A driver-wide
multi-threaded workqueue? A workqueue per-device? A workqueue
per-channel? This starts to get excessive, IMO.
Ira
next prev parent reply other threads:[~2010-02-02 21:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-06 23:33 [PATCH 0/8 v2] fsldma: cleanup driver and fix async_tx compatibility Ira W. Snyder
2010-01-06 23:33 ` [PATCH 1/8] fsldma: reduce kernel text size Ira W. Snyder
2010-01-06 23:34 ` [PATCH 2/8] fsldma: remove unused structure members Ira W. Snyder
2010-01-06 23:34 ` [PATCH 3/8] fsldma: rename struct fsl_dma_chan to struct fsldma_chan Ira W. Snyder
2010-01-06 23:34 ` [PATCH 4/8] fsldma: rename dest to dst for uniformity Ira W. Snyder
2010-01-06 23:34 ` [PATCH 5/8] fsldma: clean up the OF subsystem routines Ira W. Snyder
2010-01-06 23:34 ` [PATCH 6/8] fsldma: simplify IRQ probing and handling Ira W. Snyder
2010-01-06 23:34 ` [PATCH 7/8] fsldma: rename fsl_chan to chan Ira W. Snyder
2010-01-06 23:34 ` [PATCH 8/8] fsldma: major cleanups and fixes Ira W. Snyder
2010-02-02 21:02 ` Dan Williams
2010-02-02 21:16 ` Ira W. Snyder [this message]
2010-02-02 21:23 ` Dan Williams
2010-02-02 21:36 ` Ira W. Snyder
-- strict thread matches above, loose matches on Subject: below --
2010-01-01 6:10 fsldma: cleanup driver and fix async_tx compatibility Ira W. Snyder
2010-01-01 6:10 ` [PATCH 8/8] fsldma: major cleanups and fixes 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=20100202211656.GA2609@ovro.caltech.edu \
--to=iws@ovro.caltech.edu \
--cc=B04825@freescale.com \
--cc=Dipen.Dudhat@freescale.com \
--cc=Maneesh.Gupta@freescale.com \
--cc=R58472@freescale.com \
--cc=dan.j.williams@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=linuxppc-dev@ozlabs.org \
--cc=scottwood@freescale.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.