All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: 'Christoph Hellwig' <hch@infradead.org>
Cc: Trammell Hudson <Trammell.Hudson@twosigma.com>,
	Christos Zoulas <Christos.Zoulas@twosigma.com>,
	Sean Noonan <Sean.Noonan@twosigma.com>,
	Martin Bligh <Martin.Bligh@twosigma.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	Stephen Degler <Stephen.Degler@twosigma.com>,
	"'linux-xfs@oss.sgi.com'" <linux-xfs@oss.sgi.com>,
	"'linux-mm@kvack.org'" <linux-mm@kvack.org>,
	'Michel Lespinasse' <walken@google.com>
Subject: Re: XFS memory allocation deadlock in 2.6.38
Date: Tue, 29 Mar 2011 21:39:07 +0200	[thread overview]
Message-ID: <20110329193907.GK2310@cmpxchg.org> (raw)
In-Reply-To: <20110329192434.GA10536@infradead.org>

On Tue, Mar 29, 2011 at 03:24:34PM -0400, 'Christoph Hellwig' wrote:
> 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;

Note that vmalloc is currently broken in that it does a GFP_KERNEL
allocation if it has to allocate page table pages, even when invoked
with GFP_NOFS:

	http://marc.info/?l=linux-mm&m=128942194520631&w=4

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: "'Christoph Hellwig'" <hch@infradead.org>
Cc: Sean Noonan <Sean.Noonan@twosigma.com>,
	"'Michel Lespinasse'" <walken@google.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	Martin Bligh <Martin.Bligh@twosigma.com>,
	Trammell Hudson <Trammell.Hudson@twosigma.com>,
	Christos Zoulas <Christos.Zoulas@twosigma.com>,
	"'linux-xfs@oss.sgi.com'" <linux-xfs@oss.sgi.com>,
	Stephen Degler <Stephen.Degler@twosigma.com>,
	"'linux-mm@kvack.org'" <linux-mm@kvack.org>
Subject: Re: XFS memory allocation deadlock in 2.6.38
Date: Tue, 29 Mar 2011 21:39:07 +0200	[thread overview]
Message-ID: <20110329193907.GK2310@cmpxchg.org> (raw)
In-Reply-To: <20110329192434.GA10536@infradead.org>

On Tue, Mar 29, 2011 at 03:24:34PM -0400, 'Christoph Hellwig' wrote:
> 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;

Note that vmalloc is currently broken in that it does a GFP_KERNEL
allocation if it has to allocate page table pages, even when invoked
with GFP_NOFS:

	http://marc.info/?l=linux-mm&m=128942194520631&w=4


WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: 'Christoph Hellwig' <hch@infradead.org>
Cc: Sean Noonan <Sean.Noonan@twosigma.com>,
	'Michel Lespinasse' <walken@google.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	Martin Bligh <Martin.Bligh@twosigma.com>,
	Trammell Hudson <Trammell.Hudson@twosigma.com>,
	Christos Zoulas <Christos.Zoulas@twosigma.com>,
	"'linux-xfs@oss.sgi.com'" <linux-xfs@oss.sgi.com>,
	Stephen Degler <Stephen.Degler@twosigma.com>,
	"'linux-mm@kvack.org'" <linux-mm@kvack.org>
Subject: Re: XFS memory allocation deadlock in 2.6.38
Date: Tue, 29 Mar 2011 21:39:07 +0200	[thread overview]
Message-ID: <20110329193907.GK2310@cmpxchg.org> (raw)
In-Reply-To: <20110329192434.GA10536@infradead.org>

On Tue, Mar 29, 2011 at 03:24:34PM -0400, 'Christoph Hellwig' wrote:
> 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;

Note that vmalloc is currently broken in that it does a GFP_KERNEL
allocation if it has to allocate page table pages, even when invoked
with GFP_NOFS:

	http://marc.info/?l=linux-mm&m=128942194520631&w=4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-03-29 19:36 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21 16:19 XFS memory allocation deadlock in 2.6.38 Sean Noonan
2011-03-23 19:39 ` Sean Noonan
2011-03-23 19:39   ` Sean Noonan
2011-03-24 17:43   ` Christoph Hellwig
2011-03-24 17:43     ` Christoph Hellwig
2011-03-24 17:43     ` Christoph Hellwig
2011-03-24 23:45     ` Michel Lespinasse
2011-03-24 23:45       ` Michel Lespinasse
2011-03-24 23:45       ` Michel Lespinasse
2011-03-28 14:58       ` Sean Noonan
2011-03-28 14:58         ` Sean Noonan
2011-03-28 14:58         ` Sean Noonan
2011-03-28 21:06         ` Michel Lespinasse
2011-03-28 21:06           ` Michel Lespinasse
2011-03-28 21:06           ` Michel Lespinasse
2011-03-28 21:34           ` Sean Noonan
2011-03-28 21:34             ` Sean Noonan
2011-03-28 21:34             ` Sean Noonan
2011-03-29  0:25             ` Michel Lespinasse
2011-03-29  0:25               ` Michel Lespinasse
2011-03-29  0:25               ` Michel Lespinasse
2011-03-29  1:51             ` Dave Chinner
2011-03-29  1:51               ` Dave Chinner
2011-03-29  1:51               ` Dave Chinner
2011-03-29  2:49               ` Sean Noonan
2011-03-29  2:49                 ` Sean Noonan
2011-03-29  2:49                 ` Sean Noonan
2011-03-29 19:05             ` Sean Noonan
2011-03-29 19:05               ` Sean Noonan
2011-03-29 19:05               ` Sean Noonan
2011-03-29 19:24               ` 'Christoph Hellwig'
2011-03-29 19:24                 ` 'Christoph Hellwig'
2011-03-29 19:24                 ` 'Christoph Hellwig'
2011-03-29 19:39                 ` Johannes Weiner [this message]
2011-03-29 19:39                   ` Johannes Weiner
2011-03-29 19:39                   ` Johannes Weiner
2011-03-29 19:43                   ` 'Christoph Hellwig'
2011-03-29 19:43                     ` 'Christoph Hellwig'
2011-03-29 19:43                     ` 'Christoph Hellwig'
2011-03-29 19:46                 ` Sean Noonan
2011-03-29 19:46                   ` Sean Noonan
2011-03-29 19:46                   ` Sean Noonan
2011-03-29 20:02                   ` 'Christoph Hellwig'
2011-03-29 20:02                     ` 'Christoph Hellwig'
2011-03-29 20:02                     ` 'Christoph Hellwig'
2011-03-29 20:23                     ` Sean Noonan
2011-03-29 20:23                       ` Sean Noonan
2011-03-29 20:23                       ` Sean Noonan
2011-03-29 22:42                     ` Dave Chinner
2011-03-29 22:42                       ` Dave Chinner
2011-03-29 22:42                       ` Dave Chinner
2011-03-29 22:45                       ` Sean Noonan
2011-03-29 22:45                         ` Sean Noonan
2011-03-29 22:45                         ` Sean Noonan
2011-03-30  9:23                       ` 'Christoph Hellwig'
2011-03-30  9:23                         ` 'Christoph Hellwig'
2011-03-30  9:23                         ` 'Christoph Hellwig'
2011-03-29 19:54                 ` Sean Noonan
2011-03-29 19:54                   ` Sean Noonan
2011-03-29 19:54                   ` Sean Noonan
2011-03-30  0:09                   ` Dave Chinner
2011-03-30  0:09                     ` Dave Chinner
2011-03-30  0:09                     ` Dave Chinner
2011-03-30  1:32                     ` Sean Noonan
2011-03-30  1:32                       ` Sean Noonan
2011-03-30  1:32                       ` Sean Noonan
2011-03-30  1:44                       ` Dave Chinner
2011-03-30  1:44                         ` Dave Chinner
2011-03-30  1:44                         ` Dave Chinner
2011-03-30  1:52                         ` Sean Noonan
2011-03-30  1:52                           ` Sean Noonan
2011-03-30  1:52                           ` Sean Noonan
2011-03-30  9:30                     ` 'Christoph Hellwig'
2011-03-30  9:30                       ` 'Christoph Hellwig'
2011-03-30  9:30                       ` 'Christoph Hellwig'
2011-03-27 18:11 ` Maciej Rutecki
  -- strict thread matches above, loose matches on Subject: below --
2011-03-18 15:46 Sean Noonan
2011-03-22 10:00 ` Christoph Hellwig
2011-03-22 13:53   ` Sean Noonan
2011-03-22 23:25 ` Dave Chinner
2011-03-23 21:33   ` Sean Noonan
2011-03-23 22:03     ` Dave Chinner
2011-03-23 22:33       ` Sean Noonan

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=20110329193907.GK2310@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=Christos.Zoulas@twosigma.com \
    --cc=Martin.Bligh@twosigma.com \
    --cc=Sean.Noonan@twosigma.com \
    --cc=Stephen.Degler@twosigma.com \
    --cc=Trammell.Hudson@twosigma.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-xfs@oss.sgi.com \
    --cc=walken@google.com \
    /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.