lkml.org 
[lkml]   [2009]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH v2 03/11] async_tx: structify submission arguments, add scribble
Dan Williams wrote:
> Prepare the api for the arrival of a new parameter, 'scribble'.  This
> will allow callers to identify scratchpad memory for dma address or page
> address conversions.  As this adds yet another parameter, take this
> opportunity to convert the common submission parameters (flags,
> dependency, callback, and callback argument) into an object that is
> passed by reference.
>
> [ Impact: moves api pass-by-value parameters to a pass-by-reference struct ]
>
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
>  crypto/async_tx/async_memcpy.c |   21 ++++-----
>  crypto/async_tx/async_memset.c |   23 ++++------
>  crypto/async_tx/async_tx.c     |   34 +++++++--------
>  crypto/async_tx/async_xor.c    |   93 +++++++++++++++++-----------------------
>  drivers/md/raid5.c             |   59 +++++++++++++++----------
>  include/linux/async_tx.h       |   84 +++++++++++++++++++++++-------------
>  6 files changed, 161 insertions(+), 153 deletions(-)

(...)

> @@ -811,13 +818,11 @@ ops_run_postxor(struct stripe_head *sh, struct
> dma_async_tx_descriptor *tx)
>
>        atomic_inc(&sh->count);
>
> -       if (unlikely(count == 1)) {
> -               flags &= ~(ASYNC_TX_XOR_DROP_DST | ASYNC_TX_XOR_ZERO_DST);
> -               tx = async_memcpy(xor_dest, xor_srcs[0], 0, 0, STRIPE_SIZE,
> -                       flags, tx, ops_complete_postxor, sh);
> -       } else
> -               tx = async_xor(xor_dest, xor_srcs, 0, count, STRIPE_SIZE,
> -                       flags, tx, ops_complete_postxor, sh);
> +       init_async_submit(&submit, flags, tx, ops_complete_postxor, sh, NULL);
> +       if (unlikely(count == 1))
> +               tx = async_memcpy(xor_dest, xor_srcs[0], 0, 0, STRIPE_SIZE, &submit);
> +       else
> +               tx = async_xor(xor_dest, xor_srcs, 0, count, STRIPE_SIZE, &submit);
>  }

What about ASYNC_TX_XOR_DROP_DST and ASYNC_TX_XOR_ZERO_DST flags clearing before async_memcpy?

Maciej--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-05-29 15:49    [W:0.110 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site