From: Al Viro <viro@ZenIV.linux.org.uk>
To: Chris Mason <clm@fb.com>, Marc MERLIN <marc@merlins.org>,
linux-btrfs@vger.kernel.org
Subject: Re: Can you help explain these OOM crashes?
Date: Fri, 26 Feb 2016 02:05:19 +0000 [thread overview]
Message-ID: <20160226020519.GZ17997@ZenIV.linux.org.uk> (raw)
In-Reply-To: <20160225194251.kidqfejwlsai6h5v@floor.thefacebook.com>
On Thu, Feb 25, 2016 at 02:42:51PM -0500, Chris Mason wrote:
> Al, any ideas why get_anon_bdev is doing an atomic allocation here?
>
> if (ida_pre_get(&unnamed_dev_ida, GFP_ATOMIC) == 0)
Because set() callback of sget() runs under sb_lock - it must be atomic
wrt scanning the list of superblock in search of match. And get_anon_bdev()
is called from such callbacks...
In principle, we could change locking rules for case when test callback
is NULL, except that it's also called from ns_set_super(), which *does*
come along with non-NULL test() (see mount_ns()), so that really doesn't
help...
prev parent reply other threads:[~2016-02-26 2:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-25 19:20 Can you help explain these OOM crashes? Marc MERLIN
2016-02-25 19:42 ` Chris Mason
2016-02-26 2:05 ` Al Viro [this message]
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=20160226020519.GZ17997@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=clm@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=marc@merlins.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 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.