From: Michal Hocko <mhocko@kernel.org>
To: Joonsoo Kim <js1304@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Christoph Lameter <cl@linux.com>,
Pekka Enberg <penberg@kernel.org>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>, Shaohua Li <shli@fb.com>,
Vlastimil Babka <vbabka@suse.cz>,
Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH v2] mm/slub: don't wait for high-order page allocation
Date: Fri, 7 Aug 2015 17:05:01 +0200 [thread overview]
Message-ID: <20150807150501.GJ30785@dhcp22.suse.cz> (raw)
In-Reply-To: <1438913403-3682-1-git-send-email-iamjoonsoo.kim@lge.com>
On Fri 07-08-15 11:10:03, Joonsoo Kim wrote:
[...]
> diff --git a/mm/slub.c b/mm/slub.c
> index 257283f..52b9025 100644
> --- a/mm/slub.c
> +++ b/mm/slub.c
> @@ -1364,6 +1364,8 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node)
> * so we fall-back to the minimum order allocation.
> */
> alloc_gfp = (flags | __GFP_NOWARN | __GFP_NORETRY) & ~__GFP_NOFAIL;
> + if ((alloc_gfp & __GFP_WAIT) && oo_order(oo) > oo_order(s->min))
> + alloc_gfp = (alloc_gfp | __GFP_NOMEMALLOC) & ~__GFP_WAIT;
Wouldn't it be preferable to "fix" the __GFP_WAIT behavior than spilling
__GFP_NOMEMALLOC around the kernel? GFP flags are getting harder and
harder to use right and that is a signal we should thing about it and
unclutter the current state.
>
> page = alloc_slab_page(s, alloc_gfp, node, oo);
> if (unlikely(!page)) {
> --
> 1.9.1
--
Michal Hocko
SUSE Labs
--
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-08-07 15:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-07 2:10 Joonsoo Kim
2015-08-07 15:05 ` Michal Hocko [this message]
2015-08-10 0:40 ` Joonsoo Kim
2015-08-11 6:36 ` Michal Hocko
2015-08-12 22:31 ` David Rientjes
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=20150807150501.GJ30785@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=cl@linux.com \
--cc=edumazet@google.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=js1304@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=shli@fb.com \
--cc=vbabka@suse.cz \
/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