linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Justin Piszcz <jpiszcz@lucidpixels.com>
To: Neil Brown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org
Subject: Re: Linux MD Raid Bug(?) w/Kernel sync_speed_min Option
Date: Tue, 8 May 2007 09:13:32 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0705080912010.16228@p34.internal.lan> (raw)
In-Reply-To: <17984.29974.116526.922404@notabene.brown>



On Tue, 8 May 2007, Neil Brown wrote:

> On Tuesday May 8, jpiszcz@lucidpixels.com wrote:
>> Kernel: 2.6.21.1
>>
>> Here is the bug:
>>
>> md2: RAID1 (works fine)
>> md3: RAID5 (only syncs at the sync_speed_min set by the kernel)
>>
>> If I do not run this command:
>> echo 55000 > /sys/block/md3/md/sync_speed_min
>>
>> I will get 2 megabytes per second check speed for RAID 5.
>
> I can only reproduce this if I set the stripe_cache_size somewhat
> larger than the default of 256 - did you do this?
>
> This code (is_mddev_idle) has always been a bit fragile, particularly
> so since the block layer started account IO when it finished rather
> than when it started.
>
> This patch might help though.  Let me know if it does what you expect.
>
> Thanks,
> NeilBrown
>
>
> Signed-off-by: Neil Brown <neilb@suse.de>
>
> ### Diffstat output
> ./drivers/md/md.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff .prev/drivers/md/md.c ./drivers/md/md.c
> --- .prev/drivers/md/md.c	2007-05-07 17:47:15.000000000 +1000
> +++ ./drivers/md/md.c	2007-05-08 22:57:51.000000000 +1000
> @@ -5095,7 +5095,7 @@ static int is_mddev_idle(mddev_t *mddev)
> 		 *
> 		 * Note: the following is an unsigned comparison.
> 		 */
> -		if ((curr_events - rdev->last_events + 4096) > 8192) {
> +		if ((long)curr_events - (long)rdev->last_events > 8192) {
> 			rdev->last_events = curr_events;
> 			idle = 0;
> 		}
> -
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

> I can only reproduce this if I set the stripe_cache_size somewhat
> larger than the default of 256 - did you do this?
Yes, upon bootup I use:
echo 16384 > /sys/block/md3/md/stripe_cache_size

I have applied this patch and will test it now.

Justin.


  reply	other threads:[~2007-05-08 13:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-08 12:27 Linux MD Raid Bug(?) w/Kernel sync_speed_min Option Justin Piszcz
2007-05-08 13:03 ` Neil Brown
2007-05-08 13:13   ` Justin Piszcz [this message]
2007-05-08 13:24   ` Justin Piszcz
2007-05-09  9:13     ` Neil Brown
2007-05-08 17:24   ` Recovery of software RAID5 using FC6 rescue? Mark A. O'Neil
2007-05-08 20:04     ` Michael Tokarev
2007-05-09  6:29       ` Nix
2007-05-09 11:34         ` Michael Tokarev
2007-05-09 19:50           ` Nix
2007-05-16 16:10             ` Mark A. O'Neil

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=Pine.LNX.4.64.0705080912010.16228@p34.internal.lan \
    --to=jpiszcz@lucidpixels.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /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).