Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dave@jikos.cz>
To: Chris Mason <chris.mason@oracle.com>,
	Stefan Behrens <sbehrens@giantdisaster.de>,
	Linux Btrfs List <linux-btrfs@vger.kernel.org>
Subject: Re: [BUG] sleeping function called from atomic context
Date: Fri, 4 May 2012 15:36:16 +0200	[thread overview]
Message-ID: <20120504133615.GC19331@twin.jikos.cz> (raw)
In-Reply-To: <20120504132536.GA25477@shiny>

On Fri, May 04, 2012 at 09:25:36AM -0400, Chris Mason wrote:
> I'm having a hard time reproducing this here.  Do you have lockdep on?
> It might tell us which lock we're leaving around.

He's using SLUB and it does not like waiting allocations when
CONFIG_SLUB_DEBUG is on:

 445 #ifdef CONFIG_SLUB_DEBUG
...
 935 /*
 936  * Hooks for other subsystems that check memory allocations. In a typical
 937  * production configuration these hooks all should produce no code at all.
 938  */
 939 static inline int slab_pre_alloc_hook(struct kmem_cache *s, gfp_t flags)
 940 {
 941         flags &= gfp_allowed_mask;
 942         lockdep_trace_alloc(flags);
 943         might_sleep_if(flags & __GFP_WAIT);
 944
 945         return should_failslab(s->objsize, flags, s->flags);
 946 }
...
1223 #else
...
1259 static inline int slab_pre_alloc_hook(struct kmem_cache *s, gfp_t flags)
1260                                                         { return 0; }

where slab_pre_alloc_hook is called down the chain from kmem_cache_alloc.


david

  reply	other threads:[~2012-05-04 13:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-04 10:18 [BUG] sleeping function called from atomic context Stefan Behrens
2012-05-04 13:25 ` Chris Mason
2012-05-04 13:36   ` David Sterba [this message]
2012-05-04 15:12     ` Chris Mason
2012-05-04 15:20   ` Stefan Behrens
2012-05-04 15:38     ` Chris Mason
2012-05-04 15:50     ` Chris Mason

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=20120504133615.GC19331@twin.jikos.cz \
    --to=dave@jikos.cz \
    --cc=chris.mason@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sbehrens@giantdisaster.de \
    /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