Re: XFS deadlock fixed?

From: Christoph Hellwig
Date: Wed May 11 2011 - 12:16:10 EST


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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/