From: Michal Hocko <mhocko@kernel.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: akpm@linux-foundation.org, davem@davemloft.net,
netdev@vger.kernel.org, netfilter-devel@vger.kernel.org,
fw@strlen.de
Subject: Re: [patch 1/1] net/netfilter/x_tables.c: make allocation less aggressive
Date: Wed, 31 Jan 2018 09:08:05 +0100 [thread overview]
Message-ID: <20180131080805.GN21609@dhcp22.suse.cz> (raw)
In-Reply-To: <1517342038.3715.97.camel@gmail.com>
On Tue 30-01-18 11:53:58, Eric Dumazet wrote:
[...]
> How is __GFP_NORETRY working exactly ?
this is what the documentation says.
* __GFP_NORETRY: The VM implementation will try only very lightweight
* memory direct reclaim to get some memory under memory pressure (thus
* it can sleep). It will avoid disruptive actions like OOM killer. The
* caller must handle the failure which is quite likely to happen under
* heavy memory pressure. The flag is suitable when failure can easily be
* handled at small cost, such as reduced throughput
> Surely, if some firewall tools attempt to load a new iptables rules, we
> do not want to abort them if the request can be satisfied after few
> pages moved on swap or written back to disk.
I am not sure this really goes along with "namespace admin can request
arbitrary amount of memory" very well.
> We want to avoid huge allocations, but leave reasonable ones succeed.
Yes, that would be the best way forward. From the previous discussion
with Florian [1] it seems that "reasonable" is not that easy to figure
out. Anyway, this patch merely gets us back to pre eacd86ca3b03 times
where __GFP_NORETRY has been used for both kmalloc and vmalloc paths.
So it is more a quick band aid than a longterm solution.
[1] http://lkml.kernel.org/r/20180129165722.GF5906@breakpoint.cc
--
Michal Hocko
SUSE Labs
prev parent reply other threads:[~2018-01-31 8:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-30 19:30 [patch 1/1] net/netfilter/x_tables.c: make allocation less aggressive akpm
2018-01-30 19:53 ` Eric Dumazet
2018-01-31 8:08 ` Michal Hocko [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=20180131080805.GN21609@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=fw@strlen.de \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@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;
as well as URLs for NNTP newsgroup(s).