From: Andrew Morton <akpm@linux-foundation.org>
To: dean gaudet <dean@arctic.org>
Cc: NeilBrown <neilb@suse.de>,
linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org,
Dan Williams <dan.j.williams@gmail.com>
Subject: Re: [PATCH 001 of 6] md: Fix an occasional deadlock in raid5
Date: Tue, 15 Jan 2008 21:54:25 -0800 [thread overview]
Message-ID: <20080115215425.b1fcba31.akpm@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.0.999999.0801152059170.9578@twinlark.arctic.org>
On Tue, 15 Jan 2008 21:01:17 -0800 (PST) dean gaudet <dean@arctic.org> wrote:
> On Mon, 14 Jan 2008, NeilBrown wrote:
>
> >
> > raid5's 'make_request' function calls generic_make_request on
> > underlying devices and if we run out of stripe heads, it could end up
> > waiting for one of those requests to complete.
> > This is bad as recursive calls to generic_make_request go on a queue
> > and are not even attempted until make_request completes.
> >
> > So: don't make any generic_make_request calls in raid5 make_request
> > until all waiting has been done. We do this by simply setting
> > STRIPE_HANDLE instead of calling handle_stripe().
> >
> > If we need more stripe_heads, raid5d will get called to process the
> > pending stripe_heads which will call generic_make_request from a
> > different thread where no deadlock will happen.
> >
> >
> > This change by itself causes a performance hit. So add a change so
> > that raid5_activate_delayed is only called at unplug time, never in
> > raid5. This seems to bring back the performance numbers. Calling it
> > in raid5d was sometimes too soon...
> >
> > Cc: "Dan Williams" <dan.j.williams@gmail.com>
> > Signed-off-by: Neil Brown <neilb@suse.de>
>
> probably doesn't matter, but for the record:
>
> Tested-by: dean gaudet <dean@arctic.org>
>
> this time i tested with internal and external bitmaps and it survived 8h
> and 14h resp. under the parallel tar workload i used to reproduce the
> hang.
>
> btw this should probably be a candidate for 2.6.22 and .23 stable.
>
hm, Neil said
The first fixes a bug which could make it a candidate for 24-final.
However it is a deadlock that seems to occur very rarely, and has been in
mainline since 2.6.22. So letting it into one more release shouldn't be
a big problem. While the fix is fairly simple, it could have some
unexpected consequences, so I'd rather go for the next cycle.
food fight!
next prev parent reply other threads:[~2008-01-16 5:54 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-14 1:45 [PATCH 000 of 6] md: various fixes for md NeilBrown
2008-01-14 1:45 ` NeilBrown
2008-01-14 1:45 ` [PATCH 001 of 6] md: Fix an occasional deadlock in raid5 NeilBrown
2008-01-14 1:45 ` NeilBrown
2008-01-16 5:01 ` dean gaudet
2008-01-16 5:54 ` Andrew Morton [this message]
2008-01-16 6:13 ` dean gaudet
2008-01-16 7:09 ` Dan Williams
2008-01-16 7:15 ` Andrew Morton
2008-01-16 21:54 ` Neil Brown
2008-01-14 1:45 ` [PATCH 002 of 6] md: Fix use-after-free bug when dropping an rdev from an md array NeilBrown
2008-01-14 1:45 ` NeilBrown
2008-01-14 2:04 ` Al Viro
2008-01-14 3:21 ` Neil Brown
2008-01-14 3:43 ` Al Viro
2008-01-14 4:48 ` Neil Brown
2008-01-14 6:28 ` Neil Brown
2008-01-14 12:59 ` Al Viro
2008-01-14 13:56 ` Al Viro
2008-01-14 1:45 ` [PATCH 003 of 6] md: Change a few 'int' to 'size_t' in md NeilBrown
2008-01-14 1:45 ` [PATCH 004 of 6] md: Change INTERATE_MDDEV to for_each_mddev NeilBrown
2008-01-14 1:45 ` [PATCH 005 of 6] md: Change ITERATE_RDEV to rdev_for_each NeilBrown
2008-01-14 1:45 ` [PATCH 006 of 6] md: Change ITERATE_RDEV_GENERIC to rdev_for_each_list, and remove ITERATE_RDEV_PENDING 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=20080115215425.b1fcba31.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dan.j.williams@gmail.com \
--cc=dean@arctic.org \
--cc=linux-kernel@vger.kernel.org \
--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 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.