xfs
[Top] [All Lists]

Re: XFS memory allocation deadlock in 2.6.38

To: Sean Noonan <Sean.Noonan@xxxxxxxxxxxx>
Subject: Re: XFS memory allocation deadlock in 2.6.38
From: "'Christoph Hellwig'" <hch@xxxxxxxxxxxxx>
Date: Tue, 29 Mar 2011 15:24:34 -0400
Cc: "'Michel Lespinasse'" <walken@xxxxxxxxxx>, "'Christoph Hellwig'" <hch@xxxxxxxxxxxxx>, "'linux-kernel@xxxxxxxxxxxxxxx'" <linux-kernel@xxxxxxxxxxxxxxx>, Martin Bligh <Martin.Bligh@xxxxxxxxxxxx>, Trammell Hudson <Trammell.Hudson@xxxxxxxxxxxx>, Christos Zoulas <Christos.Zoulas@xxxxxxxxxxxx>, "'linux-xfs@xxxxxxxxxxx'" <linux-xfs@xxxxxxxxxxx>, Stephen Degler <Stephen.Degler@xxxxxxxxxxxx>, "'linux-mm@xxxxxxxxx'" <linux-mm@xxxxxxxxx>
In-reply-to: <081DDE43F61F3D43929A181B477DCA95639B5359@xxxxxxxxxxxxxxxxxxxx>
References: <081DDE43F61F3D43929A181B477DCA95639B52FD@xxxxxxxxxxxxxxxxxxxx> <081DDE43F61F3D43929A181B477DCA95639B5327@xxxxxxxxxxxxxxxxxxxx> <20110324174311.GA31576@xxxxxxxxxxxxx> <AANLkTikwwRm6FHFtEdUg54NvmKdswQw-NPH5dtq1mXBK@xxxxxxxxxxxxxx> <081DDE43F61F3D43929A181B477DCA95639B5349@xxxxxxxxxxxxxxxxxxxx> <BANLkTin0jJevStg5P2hqsLbqMzo3o30sYg@xxxxxxxxxxxxxx> <081DDE43F61F3D43929A181B477DCA95639B534E@xxxxxxxxxxxxxxxxxxxx> <081DDE43F61F3D43929A181B477DCA95639B5359@xxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
Can you check if the brute force patch below helps?  If it does I
still need to refine it a bit, but it could be that we are doing
an allocation under an xfs lock that could recurse back into the
filesystem.  We have a per-process flag to disable that for normal
kmalloc allocation, but we lost it for vmalloc in the commit you
bisected the regression to.


Index: xfs/fs/xfs/linux-2.6/kmem.h
===================================================================
--- xfs.orig/fs/xfs/linux-2.6/kmem.h    2011-03-29 21:16:58.039224236 +0200
+++ xfs/fs/xfs/linux-2.6/kmem.h 2011-03-29 21:17:08.368223598 +0200
@@ -63,7 +63,7 @@ static inline void *kmem_zalloc_large(si
 {
        void *ptr;
 
-       ptr = vmalloc(size);
+       ptr = __vmalloc(size, GFP_NOFS | __GFP_HIGHMEM, PAGE_KERNEL);
        if (ptr)
                memset(ptr, 0, size);
        return ptr;

<Prev in Thread] Current Thread [Next in Thread>