All of lore.kernel.org
 help / color / mirror / Atom feed
From: andrew@lunn.ch (Andrew Lunn)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Device Tree binding for the 'mv_xor' XOR engine DMA driver
Date: Mon, 19 Nov 2012 07:40:42 +0100	[thread overview]
Message-ID: <20121119064042.GO14643@lunn.ch> (raw)
In-Reply-To: <EE71107DF0D1F24FA2D95041E64AB9E801A56BA6A7E7@IL-MB01.marvell.com>

> > The dmatest shows up a second issue:
> > 
> > root at qnap:~# insmod ./dmatest.ko iterations=100
> > dmatest: Started 2 threads using dma0chan0
> > dmatest: Started 2 threads using dma1chan0
> > dmatest: Started 2 threads using dma2chan0
> > dmatest: Started 2 threads using dma3chan0
> > dma3chan0-xor0: #3: prep error with src_off=0x13c2 dst_off=0x2c7c
> > len=0x5d
> > dma1chan0-copy0: #16: prep error with src_off=0x1f50 dst_off=0x904
> > len=0x33
> > dma3chan0-copy0: #22: prep error with src_off=0x14c2 dst_off=0x389b
> > len=0x6f
> > dma0chan0-copy0: #31: prep error with src_off=0x10b6 dst_off=0x323c
> > len=0x2f
> > dma3chan0-copy0: #49: prep error with src_off=0x17b5 dst_off=0x3eca
> > len=0x29
> > 
> > The driver refuses any operation where the buffer is less than 128 bytes. The
> > datasheet for Kirkwood says the buffer length must be 8 bytes or more. So
> > maybe we should reduce this 128 limit down to 8?
> 
> This limitation (128B) is only in memset operations (set in registers and not descriptors).
> If I recall correctly the limit is 16B and not 8B.
> 
> In any way, this 128 bytes seems like a good logical boundary for XOR HW enabling. (performance wise)

Hi Lior

Agreed. Anything smaller than that, and you spend more time setting up
the hardware and dealing with interrupts when its finished than doing
it in software.

I had quick look at some of the call sites. Users of the DMA API under
the crypto directory all fall back to software operations when the DMA
API returns an error. Also, raid uses the crypto API for memcpy and
XOR. So raid seems O.K. I could not find any other users of the DMA
API for _xor, _copy, or _memset. So it seems safe to return an error
for inefficient usage.

      Andrew

  reply	other threads:[~2012-11-19  6:40 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-15 17:20 [PATCH] Device Tree binding for the 'mv_xor' XOR engine DMA driver Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 01/29] mv_xor: use dev_(err|info|notice) instead of dev_printk Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 02/29] mv_xor: do not use pool_size from platform_data within the driver Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 03/29] mv_xor: split initialization/cleanup of XOR channels Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 04/29] mv_xor: allow channels to be registered directly from the main device Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 05/29] arm: plat-orion: convert the registration of the xor0 engine to the single driver Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 06/29] arm: plat-orion: convert the registration of the xor1 " Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 07/29] arm: plat-orion: remove unused orion_xor_init_channels() Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 08/29] mv_xor: remove sub-driver 'mv_xor' Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 09/29] mv_xor: remove 'shared' from mv_xor_platform_data Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 10/29] mv_xor: rename mv_xor_platform_data to mv_xor_channel_data Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 11/29] mv_xor: rename mv_xor_shared_platform_data to mv_xor_platform_data Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 12/29] mv_xor: change the driver name to 'mv_xor' Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 13/29] mv_xor: rename many symbols to remove the 'shared' word Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 14/29] mv_xor: remove unused id field in mv_xor_device structure Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 15/29] mv_xor: remove unused to_mv_xor_device() macro Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 16/29] mv_xor: simplify dma_sync_single_for_cpu() calls Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 17/29] mv_xor: introduce a mv_chan_to_devp() helper Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 18/29] mv_xor: get rid of the pdev pointer in mv_xor_device Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 19/29] mv_xor: in mv_xor_chan, rename 'common' to 'dmachan' Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 20/29] mv_xor: in mv_xor_device, rename 'common' to 'dmadev' Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 21/29] mv_xor: use mv_xor_chan pointers as arguments to self-test functions Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 22/29] mv_xor: merge mv_xor_device and mv_xor_chan Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 23/29] mv_xor: rename mv_xor_private to mv_xor_device Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 24/29] mv_xor: remove useless backpointer from mv_xor_chan " Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 25/29] mv_xor: remove hw_id field from platform_data Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 26/29] mv_xor: remove the pool_size " Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 27/29] mv_xor: add missing free_irq() call Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 28/29] mv_xor: add Device Tree binding Thomas Petazzoni
2012-11-15 17:20   ` Thomas Petazzoni
2012-11-15 17:20 ` [PATCH 29/29] arm: mvebu: add XOR engines to Armada 370/XP .dtsi Thomas Petazzoni
2012-11-18 10:36 ` [PATCH] Device Tree binding for the 'mv_xor' XOR engine DMA driver Andrew Lunn
2012-11-18 10:50   ` Thomas Petazzoni
2012-11-18 10:57     ` Andrew Lunn
2012-11-18 12:16   ` Lior Amsalem
2012-11-19  6:40     ` Andrew Lunn [this message]
2012-11-19 11:40       ` Lior Amsalem

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=20121119064042.GO14643@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=linux-arm-kernel@lists.infradead.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 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.