mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Mahoney <jeffm@suse.com>
To: Denis Kirjanov <dkirjanov@cloudlinux.com>, linux-btrfs@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, chris.mason@fusionio.com
Subject: Re: __link_block_group uses GFP_KERNEL
Date: Fri, 24 Mar 2017 19:13:40 -0400	[thread overview]
Message-ID: <a43bf7e1-36fe-cb49-d0ba-697ddaf1a14e@suse.com> (raw)
In-Reply-To: <CABxMtgcGod=FvgHagua07bzPjc7cy_+v0hkbTvwH_7GggOh9Ow@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 661 bytes --]

On 3/24/17 5:02 AM, Denis Kirjanov wrote:
> Hi guys,
> 
> Looks like that current code does GFP_KERNEL allocation inside
> __link_block_group.
> the function invokes kobject_add and internally creates sysfs files
> with the GFP_KERNEL flag set.

Yep, that's a bug.

> But since do_chunk_alloc executes insides the btrfs transaction it's
> not allowed to sleep.

It's allowed to sleep but isn't allowed to do reclaim that involves file
system writeback.  Michal Hocko's allocation context idea would fix
this, but it's not there yet, so we'll need to defer the kobject_add
until we can use GFP_KERNEL.

-Jeff

-- 
Jeff Mahoney
SUSE Labs


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2017-03-24 23:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24  9:02 Denis Kirjanov
2017-03-24 23:13 ` Jeff Mahoney [this message]
2017-03-25  6:48   ` Denis Kirjanov
2017-03-27 17:18     ` David Sterba
2017-03-28  8:16       ` Denis Kirjanov

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=a43bf7e1-36fe-cb49-d0ba-697ddaf1a14e@suse.com \
    --to=jeffm@suse.com \
    --cc=chris.mason@fusionio.com \
    --cc=dkirjanov@cloudlinux.com \
    --cc=linux-btrfs@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®