From: Michal Hocko <mhocko@kernel.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Minchan Kim <minchan@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-mm <linux-mm@kvack.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Vladimir Davydov <vdavydov.dev@gmail.com>
Subject: Re: [PATCH] mm:memcg: add __GFP_NOWARN in __memcg_schedule_kmem_cache_create
Date: Wed, 18 Apr 2018 09:09:58 +0200 [thread overview]
Message-ID: <20180418070958.GM17484@dhcp22.suse.cz> (raw)
In-Reply-To: <20180418030824.GA7320@bombadil.infradead.org>
On Tue 17-04-18 20:08:24, Matthew Wilcox wrote:
> On Wed, Apr 18, 2018 at 11:29:12AM +0900, Minchan Kim wrote:
> > If there are heavy memory pressure, page allocation with __GFP_NOWAIT
> > fails easily although it's order-0 request.
> > I got below warning 9 times for normal boot.
> >
> > [ 17.072747] c0 0 <snip >: page allocation failure: order:0, mode:0x2200000(GFP_NOWAIT|__GFP_NOTRACK)
> >
> > Let's not make user scared.
> >
> > - cw = kmalloc(sizeof(*cw), GFP_NOWAIT);
> > + cw = kmalloc(sizeof(*cw), GFP_NOWAIT | __GFP_NOWARN);
> > if (!cw)
>
> Not arguing against this patch. But how many places do we want to use
> GFP_NOWAIT without __GFP_NOWARN? Not many, and the few which do do this
> seem like they simply haven't added it yet. Maybe this would be a good idea?
>
> -#define GFP_NOWAIT (__GFP_KSWAPD_RECLAIM)
> +#define GFP_NOWAIT (__GFP_KSWAPD_RECLAIM | __GFP_NOWARN)
We have tried something like this in the past and Linus was strongly
against. I do not have reference handy but his argument was that each
__GFP_NOWARN should be explicit rather than implicit because it is
a deliberate decision to make.
--
Michal Hocko
SUSE Labs
next prev parent reply other threads:[~2018-04-18 7:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-18 2:29 Minchan Kim
2018-04-18 2:56 ` David Rientjes
2018-04-18 3:08 ` Matthew Wilcox
2018-04-18 4:16 ` David Rientjes
2018-04-18 7:09 ` Michal Hocko [this message]
2018-04-18 7:20 ` Michal Hocko
2018-04-18 7:41 ` Minchan Kim
2018-04-18 7:54 ` Michal Hocko
2018-04-18 13:23 ` Minchan Kim
2018-04-18 13:27 ` Michal Hocko
2018-04-18 18:58 ` David Rientjes
2018-04-19 6:40 ` Michal Hocko
2018-04-20 5:42 ` Minchan Kim
2018-04-20 8:09 ` Michal Hocko
2018-04-18 13:31 ` Matthew Wilcox
2018-04-18 13:39 ` Michal Hocko
2018-04-18 19:05 ` Johannes Weiner
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=20180418070958.GM17484@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=vdavydov.dev@gmail.com \
--cc=willy@infradead.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