From: "Dan Williams" <dan.j.williams@intel.com>
To: "Ilya Yanok" <yanok@emcraft.com>
Cc: linux-raid@vger.kernel.org, linuxppc-dev@ozlabs.org, dzu@denx.de,
wd@denx.de
Subject: Re: [PATCH 02/11] async_tx: add support for asynchronous GF multiplication
Date: Fri, 14 Nov 2008 18:28:08 -0700 [thread overview]
Message-ID: <e9c3a7c20811141728m3fee8a00jb1be0f36fb852fdd@mail.gmail.com> (raw)
In-Reply-To: <1226589364-5619-3-git-send-email-yanok@emcraft.com>
On Thu, Nov 13, 2008 at 8:15 AM, Ilya Yanok <yanok@emcraft.com> wrote:
> This adds support for doing asynchronous GF multiplication by adding
> four additional functions to async_tx API:
> async_pqxor() does simultaneous XOR of sources and XOR of sources
> GF-multiplied by given coefficients.
> async_pqxor_zero_sum() checks if results of calculations match given
> ones.
> async_gen_syndrome() does sumultaneous XOR and R/S syndrome of sources.
> async_syndrome_zerosum() checks if results of XOR/syndrome calculation
> matches given ones.
>
> Latter two functions just use pqxor with approprite coefficients in
> asynchronous case but have significant optimizations if synchronous
> case.
>
> To support this API dmaengine driver should set DMA_PQ_XOR and
> DMA_PQ_ZERO_SUM capabilities and provide device_prep_dma_pqxor and
> device_prep_dma_pqzero_sum methods in dma_device structure.
>
> Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
> ---
A few comments
1/ I don't see code for handling cases where the src_cnt exceeds the
hardware maximum.
2/ dmaengine.h defines DMA_PQ_XOR but these patches should really
change that to DMA_PQ and do s/pqxor/pq/ across the rest of the code
base.
3/ In my implementation (unfinished) of async_pq I decided to make the
prototype:
+/**
+ * async_pq - attempt to generate p (xor) and q (Reed-Solomon code) with a
+ * dma engine for a given set of blocks. This routine assumes a field of
+ * GF(2^8) with a primitive polynomial of 0x11d and a generator of {02}.
+ * In the synchronous case the p and q blocks are used as temporary
+ * storage whereas dma engines have their own internal buffers. The
+ * ASYNC_TX_PQ_ZERO_P and ASYNC_TX_PQ_ZERO_Q flags clear the
+ * destination(s) before they are used.
+ * @blocks: source block array ordered from 0..src_cnt with the p destination
+ * at blocks[src_cnt] and q at blocks[src_cnt + 1]
+ * NOTE: client code must assume the contents of this array are destroyed
+ * @offset: offset in pages to start transaction
+ * @src_cnt: number of source pages: 2 < src_cnt <= 255
+ * @len: length in bytes
+ * @flags: ASYNC_TX_ACK, ASYNC_TX_DEP_ACK
+ * @depend_tx: p+q operation depends on the result of this transaction.
+ * @cb_fn: function to call when p+q generation completes
+ * @cb_param: parameter to pass to the callback routine
+ */
+struct dma_async_tx_descriptor *
+async_pq(struct page **blocks, unsigned int offset, int src_cnt, size_t len,
+ enum async_tx_flags flags, struct dma_async_tx_descriptor *depend_tx,
+ dma_async_tx_callback cb_fn, void *cb_param)
Where p and q are not specified separately. This matches more closely
how the current gen_syndrome is specified with the goal of not
requiring any changes to existing software raid6 interface.
Thoughts?
--
Dan
next prev parent reply other threads:[~2008-11-15 1:28 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-13 15:15 [RFC PATCH 00/11] md: support for asynchronous execution of RAID6 operations Ilya Yanok
2008-11-13 15:15 ` [PATCH 01/11] async_tx: don't use src_list argument of async_xor() for dma addresses Ilya Yanok
2008-11-15 0:42 ` Dan Williams
2008-11-15 7:12 ` Benjamin Herrenschmidt
2008-11-13 15:15 ` [PATCH 02/11] async_tx: add support for asynchronous GF multiplication Ilya Yanok
2008-11-15 1:28 ` Dan Williams [this message]
2008-11-27 1:26 ` Re[2]: " Yuri Tikhonov
2008-11-28 21:18 ` Dan Williams
2008-11-13 15:15 ` [PATCH 03/11] async_tx: add support for asynchronous RAID6 recovery operations Ilya Yanok
2008-11-13 15:15 ` [PATCH 04/11] md: run stripe operations outside the lock Ilya Yanok
2008-11-13 15:15 ` [PATCH 05/11] md: common schedule_reconstruction for raid5/6 Ilya Yanok
2008-11-13 15:15 ` [PATCH 06/11] md: change handle_stripe_fill6 to work in asynchronous way Ilya Yanok
2008-11-13 15:16 ` [PATCH 07/11] md: rewrite handle_stripe_dirtying6 " Ilya Yanok
2008-11-13 15:16 ` [PATCH 08/11] md: asynchronous handle_parity_check6 Ilya Yanok
2008-11-13 15:16 ` [PATCH 09/11] md: change handle_stripe6 to work asynchronously Ilya Yanok
2008-11-13 15:16 ` [PATCH 10/11] md: remove unused functions Ilya Yanok
2008-11-13 15:16 ` [PATCH 11/11] ppc440spe-adma: ADMA driver for PPC440SP(e) systems Ilya Yanok
2008-11-13 16:03 ` Josh Boyer
2008-11-13 17:50 ` Ilya Yanok
2008-11-13 17:54 ` Josh Boyer
2008-12-09 1:08 ` Re[2]: " Yuri Tikhonov
2009-05-06 15:32 ` 440SPE ADMA driver Tirumala Reddy Marri
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=e9c3a7c20811141728m3fee8a00jb1be0f36fb852fdd@mail.gmail.com \
--to=dan.j.williams@intel.com \
--cc=dzu@denx.de \
--cc=linux-raid@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=wd@denx.de \
--cc=yanok@emcraft.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).