linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Ira W. Snyder" <iws@ovro.caltech.edu>
To: Dan Williams <dan.j.williams@intel.com>
Cc: herbert@gondor.apana.org.au,
	Suresh Vishnu-B05022 <B05022@freescale.com>,
	Tabi Timur-B04825 <B04825@freescale.com>,
	linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org,
	linuxppc-dev@ozlabs.org, linux-crypto@vger.kernel.org,
	Gupta Maneesh-B18878 <B18878@freescale.com>,
	Dudhat Dipen-B09055 <B09055@freescale.com>,
	Li Yang-R58472 <r58472@freescale.com>
Subject: Re: [PATCH v2 2/2] Crypto: Talitos: Support for Async_tx XOR offload
Date: Sat, 26 Dec 2009 13:41:46 -0800	[thread overview]
Message-ID: <20091226214146.GA4904@ovro.caltech.edu> (raw)
In-Reply-To: <e9c3a7c20912181417v2b8155e5w23fb3cee02b9a4c9@mail.gmail.com>

On Fri, Dec 18, 2009 at 03:17:42PM -0700, Dan Williams wrote:
> On Fri, Dec 18, 2009 at 8:02 AM, Li Yang-R58472 <r58472@freescale.com> wrote:
> >
> >>Subject: Re: [PATCH v2 2/2] Crypto: Talitos: Support for
> >>Async_tx XOR offload
> >>
> >>Ira W. Snyder wrote:
> >>> Yes, I have used the device_prep_dma_interrupt()
> >>functionality quite a
> >>> while back. However, I found it to be pretty much useless.
> >>
> >>The specific case it is needed for Talitos/raid is a channel
> >>switch interrupt.  The interrupt causes the cleanup operation
> >>to be run which will kick off any pending dependent operations
> >>on the xor channel.  In the raid case we only have callbacks
> >>at the end of a chain, so we need the interrupt to kick the
> >>engine in an operation chain like
> >>xor->copy->xor->callback.
> >
> > I am wondering if can use more callbacks to kick off pending dependent operations?
> > Like xor->callback->copy->callback->xor->callback?
> >
> 
> No, the callback field is reserved for clients of the api.  What you want is:
> 
> xor->cleanupT->copy->cleanupF->xor->cleanupT->callback
> 
> Where cleanupT is the Talitos descriptor cleanup routine and cleanupF
> is from fsldma.  The assumption is that the interrupt kicks the
> cleanup routine and that calls dma_run_dependencies().
> 

Hello Dan,

I guess it is not clear to driver authors that they should call
dma_run_dependencies() for each dma_async_tx_descriptor that is
processed. Without a careful re-reading of this email, I would not have
known. I guess anyone reviewing the driver missed it too. Judging by the
code in other drivers, it should be called immediately after calling the
callback function. The fsldma driver doesn't even call the function at
the moment.

To the people testing fsldma with talitos: you should probably try
adding a call to dma_run_dependencies() in the fsl_chan_ld_cleanup()
function. Then run your tests again, and see if the interoperability
problems are fixed.

I'm still working through a cleanup patch series. There are some places
where the locking doesn't seem right to me, and I'll be attempting to
fix those as I go through the driver.

Ira

  reply	other threads:[~2009-12-26 21:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-16 15:34 [PATCH v2 2/2] Crypto: Talitos: Support for Async_tx XOR offload Vishnu Suresh
2009-12-16 22:41 ` Kim Phillips
2009-12-16 22:38   ` Kumar Gala
2009-12-16 22:47     ` Dan Williams
2009-12-17 17:09       ` Ira W. Snyder
2009-12-17 17:29         ` Kumar Gala
2009-12-17 17:44         ` Dan Williams
2009-12-17 18:45           ` Kumar Gala
2009-12-18  0:58             ` Dan Williams
2009-12-18 15:02           ` Li Yang-R58472
2009-12-18 22:17             ` Dan Williams
2009-12-26 21:41               ` Ira W. Snyder [this message]
2009-12-18 14:46         ` Li Yang-R58472
2010-07-14  3:58 ` hank peng

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=20091226214146.GA4904@ovro.caltech.edu \
    --to=iws@ovro.caltech.edu \
    --cc=B04825@freescale.com \
    --cc=B05022@freescale.com \
    --cc=B09055@freescale.com \
    --cc=B18878@freescale.com \
    --cc=dan.j.williams@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=r58472@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 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).