public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Felipe Wilhelms Damasio - Taghos <felipewd@taghos.com.br>
Cc: linux-kernel@vger.kernel.org
Subject: Re: XFS deadlock fixed?
Date: Wed, 11 May 2011 11:35:46 -0400	[thread overview]
Message-ID: <20110511153546.GA11224@infradead.org> (raw)
In-Reply-To: <20110511153501.GA8457@infradead.org>

And here's the actual patch, sorry:


Index: linux-2.6/fs/xfs/linux-2.6/kmem.c
===================================================================
--- linux-2.6.orig/fs/xfs/linux-2.6/kmem.c	2011-05-11 17:29:51.729191621 +0200
+++ linux-2.6/fs/xfs/linux-2.6/kmem.c	2011-05-11 17:30:22.915689382 +0200
@@ -56,10 +56,12 @@ kmem_alloc(size_t size, unsigned int __n
 		ptr = kmalloc(size, lflags);
 		if (ptr || (flags & (KM_MAYFAIL|KM_NOSLEEP)))
 			return ptr;
-		if (!(++retries % 100))
+		if (!(++retries % 100)) {
 			xfs_err(NULL,
 		"possible memory allocation deadlock in %s (mode:0x%x)",
 					__func__, lflags);
+			dump_stack();
+		}
 		congestion_wait(BLK_RW_ASYNC, HZ/50);
 	} while (1);
 }
@@ -112,10 +114,12 @@ kmem_zone_alloc(kmem_zone_t *zone, unsig
 		ptr = kmem_cache_alloc(zone, lflags);
 		if (ptr || (flags & (KM_MAYFAIL|KM_NOSLEEP)))
 			return ptr;
-		if (!(++retries % 100))
+		if (!(++retries % 100)) {
 			xfs_err(NULL,
 		"possible memory allocation deadlock in %s (mode:0x%x)",
 					__func__, lflags);
+			dump_stack();
+		}
 		congestion_wait(BLK_RW_ASYNC, HZ/50);
 	} while (1);
 }

      reply	other threads:[~2011-05-11 16:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-10  3:40 XFS deadlock fixed? Felipe Wilhelms Damasio - Taghos
2011-05-11 15:35 ` Christoph Hellwig
2011-05-11 15:35   ` Christoph Hellwig [this message]

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=20110511153546.GA11224@infradead.org \
    --to=hch@infradead.org \
    --cc=felipewd@taghos.com.br \
    --cc=linux-kernel@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