linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: b29237@freescale.com
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org,
	r58472@freescale.com
Subject: Re: [PATCH][RFC] 	RAID5/DMA/memcpy: zero copy the bio page when possible
Date: Tue, 3 Jan 2012 10:13:35 +1100	[thread overview]
Message-ID: <20120103101335.3f8f81bc@notabene.brown> (raw)
In-Reply-To: <1325049608-8638-1-git-send-email-b29237@freescale.com>

[-- Attachment #1: Type: text/plain, Size: 1349 bytes --]

On Wed, 28 Dec 2011 13:20:08 +0800 <b29237@freescale.com> wrote:

> From: Forrest shi <b29237@freescale.com>
> 
> 	use bio page directly instead of copying the bio page to stripe
> 	header page when possible.
> 
> 	Signed-off-by: Forrest Shi<b29237@freescale.com>

I'm sorry but if you want anyone to review this and comment on it you need to
give us a bit more help - like telling us what the purpose of the patch is.

There are a couple of hints but what is needed is a 'big picture'
description.  What is the problem you are fixing?  How are you fixing it?
What are the costs/benefits?

> @@ -754,10 +764,16 @@ ops_run_compute5(struct stripe_head *sh, struct raid5_percpu *percpu)
>  		__func__, (unsigned long long)sh->sector, target);
>  	BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags));
>  
> -	for (i = disks; i--; )
> +	for (i = disks; i--; ) {
> +		struct r5dev *dev = &sh->dev[i];
> +		struct page *pg = dev->page;
>  		if (i != target)
> -			xor_srcs[count++] = sh->dev[i].page;
> -
> +#ifdef CONFIG_OPTIMIZE_FSL_DMA_MEMCPY
> +			if (test_bit(R5_DirectAccess, &dev->flags))
> +				pg = dev->req.bi_io_vec[0].bv_page;
> +#endif
> +			xor_srcs[count++] = pg;
> +	}
>  	atomic_inc(&sh->count);

And something is very wrong here.  I think you need { } around the body of
the 'if' statement.

NeilBrown


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2012-01-02 23:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-28  5:20 [PATCH][RFC] RAID5/DMA/memcpy: zero copy the bio page when possible b29237
2012-01-02 23:13 ` NeilBrown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-01-11  7:47 b29237
2012-01-11  7:48 ` Shi Xuelin-B29237
2012-01-11  8:08 ` NeilBrown

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=20120103101335.3f8f81bc@notabene.brown \
    --to=neilb@suse.de \
    --cc=b29237@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.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).