linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: kyle <kylewong@southa.com>, linux-raid@vger.kernel.org
Subject: Re: change strip_cache_size freeze the whole raid
Date: Tue, 23 Jan 2007 09:47:25 +1100	[thread overview]
Message-ID: <17845.16125.443504.552886@notabene.brown> (raw)
In-Reply-To: message from Neil Brown on Tuesday January 23

On Tuesday January 23, neilb@suse.de wrote:
> 
> This patch will almost certainly fix the problem, though I would like
> to completely understand it first....


Of course, that patch didn't compile.... The "GFP_IO" should have been
"GFP_NOIO".
As below.

NeilBrown

--------------------------
Avoid possible malloc deadlock in raid5.

Due to reports of raid5 hanging when growing the stripe cache,
it is best to use GFP_IO for those allocation.  We would rather
fail than deadlock.

Signed-off-by: Neil Brown <neilb@suse.de>

### Diffstat output
 ./drivers/md/raid5.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c
--- .prev/drivers/md/raid5.c	2007-01-23 09:44:22.000000000 +1100
+++ ./drivers/md/raid5.c	2007-01-23 09:44:43.000000000 +1100
@@ -205,7 +205,7 @@ static int grow_buffers(struct stripe_he
 	for (i=0; i<num; i++) {
 		struct page *page;
 
-		if (!(page = alloc_page(GFP_KERNEL))) {
+		if (!(page = alloc_page(GFP_NOIO))) {
 			return 1;
 		}
 		sh->dev[i].page = page;
@@ -321,7 +321,7 @@ static struct stripe_head *get_active_st
 static int grow_one_stripe(raid5_conf_t *conf)
 {
 	struct stripe_head *sh;
-	sh = kmem_cache_alloc(conf->slab_cache, GFP_KERNEL);
+	sh = kmem_cache_alloc(conf->slab_cache, GFP_NOIO);
 	if (!sh)
 		return 0;
 	memset(sh, 0, sizeof(*sh) + (conf->raid_disks-1)*sizeof(struct r5dev));

  reply	other threads:[~2007-01-22 22:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-22 11:02 change strip_cache_size freeze the whole raid kyle
2007-01-22 12:18 ` Justin Piszcz
2007-01-22 13:09   ` kyle
2007-01-22 14:56     ` Justin Piszcz
2007-01-22 15:18       ` kyle
2007-01-22 14:57   ` Steve Cousins
2007-01-22 15:01     ` Justin Piszcz
2007-01-23 14:22       ` kyle
2007-01-22 15:10     ` Justin Piszcz
2007-01-22 15:13     ` kyle
2007-01-22 16:10   ` Liang Yang
2007-01-22 20:23 ` Neil Brown
2007-01-22 22:47   ` Neil Brown [this message]
2007-01-23 10:57   ` Justin Piszcz
2007-01-24 23:24   ` Justin Piszcz
2007-01-25  0:13     ` Neil Brown
2007-01-25  0:16       ` Justin Piszcz
2007-01-25  2:29         ` Neil Brown

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=17845.16125.443504.552886@notabene.brown \
    --to=neilb@suse.de \
    --cc=kylewong@southa.com \
    --cc=linux-raid@vger.kernel.org \
    /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).