From: Andrew Morton <akpm@linux-foundation.org>
To: Michal Hocko <mhocko@kernel.org>
Cc: Guenter Roeck <linux@roeck-us.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Christoph Lameter <cl@linux.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
linux-mm@kvack.org, Dave Chinner <david@fromorbit.com>
Subject: Re: linux-next: kernel BUG at mm/slub.c:1447!
Date: Mon, 5 Oct 2015 12:29:36 -0700 [thread overview]
Message-ID: <20151005122936.8a3b0fe21629390c9aa8bc2a@linux-foundation.org> (raw)
In-Reply-To: <20151005134713.GC7023@dhcp22.suse.cz>
On Mon, 5 Oct 2015 15:47:13 +0200 Michal Hocko <mhocko@kernel.org> wrote:
> > The fourth best way of fixing this is a nasty short-term bodge, such a
> > the one you just sent ;) But if we're going to do this, it should be
> > the minimal bodge which fixes this deadlock. Is it possible to come up
> > with a one-liner (plus suitable comment) to get us out of this mess?
>
> Yes I do agree that the fix I am proposing is short-term but this seems
> like the easiest way to go for stable and older kernels that might be
> affected. I thought your proposal for mapping_gfp_constraint was exactly
> to have all such places annotated for an easier future transition to
> something more reasonable.
hm, OK, let's go that way. But I expect this mess will continue to
float around for a long time - fixing it nicely will be somewhat
intrusive.
> > Longer-term I suggest we look at generalising the memalloc_noio_foo()
> > stuff so as to permit callers to mask off (ie: zero) __GFP_ flags in
> > callees. I have a suspicion we should have done this 15 years ago
> > (which is about when I started wanting to do it).
>
> I am not sure memalloc_noio_foo is a huge win. It is an easy hack where
> the whole allocation transaction is clear - like in the PM code. I am
> not sure this is true also for the FS.
mm.. I think it'll work out OK - a set/restore around particular
callsites.
It might get messy in core MM though. Do we apply current->mask at the
very low levels of the page allocator? If so, that might muck up
intermediate callers who are peeking into specific gfp_t flags.
Perhaps it would be better to apply the mask at the highest possible
level: wherever a function which was not passed a gfp_t decides to
create one. Basically a grep for "GFP_". But then we need to decide
*which* gfp_t-creators need the treatment. All of them (yikes) or is
this mechanism only for called-via-address_space_operations code? That
might work.
Maybe it would be better to add the gfp_t argument to the
address_space_operations. At a minimum, writepage(), readpage(),
writepages(), readpages(). What a pickle.
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-10-05 19:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <560D59F7.4070002@roeck-us.net>
2015-10-01 20:49 ` linux-next: kernel BUG at mm/slub.c:1447! Andrew Morton
2015-10-02 7:25 ` Michal Hocko
2015-10-02 8:53 ` Michal Hocko
2015-10-02 20:49 ` Andrew Morton
2015-10-05 13:47 ` Michal Hocko
2015-10-05 19:29 ` Andrew Morton [this message]
2015-10-06 2:12 ` Andrew Morton
2015-10-06 5:12 ` Dave Chinner
2015-10-02 13:36 ` Guenter Roeck
2015-10-02 13:42 ` Michal Hocko
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=20151005122936.8a3b0fe21629390c9aa8bc2a@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=david@fromorbit.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@roeck-us.net \
--cc=mhocko@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;
as well as URLs for NNTP newsgroup(s).