netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org, ast@kernel.org, gthelen@google.com
Subject: Re: [PATCH net] netlink: do not enter direct reclaim from netlink_dump()
Date: Thu, 06 Oct 2016 20:53:55 -0400 (EDT)	[thread overview]
Message-ID: <20161006.205355.1211690896171215733.davem@davemloft.net> (raw)
In-Reply-To: <1475694798.28155.215.camel@edumazet-glaptop3.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 06 Oct 2016 04:13:18 +0900

> From: Eric Dumazet <edumazet@google.com>
> 
> Since linux-3.15, netlink_dump() can use up to 16384 bytes skb
> allocations.
> 
> Due to struct skb_shared_info ~320 bytes overhead, we end up using
> order-3 (on x86) page allocations, that might trigger direct reclaim and
> add stress.
> 
> The intent was really to attempt a large allocation but immediately
> fallback to a smaller one (order-1 on x86) in case of memory stress.
> 
> On recent kernels (linux-4.4), we can remove __GFP_DIRECT_RECLAIM to
> meet the goal. Old kernels would need to remove __GFP_WAIT
> 
> While we are at it, since we do an order-3 allocation, allow to use
> all the allocated bytes instead of 16384 to reduce syscalls during
> large dumps.
> 
> iproute2 already uses 32KB recvmsg() buffer sizes.
> 
> Alexei provided an initial patch downsizing to SKB_WITH_OVERHEAD(16384)
> 
> Fixes: 9063e21fb026 ("netlink: autosize skb lengthes")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Reported-by: Alexei Starovoitov <ast@kernel.org>
> Cc: Greg Thelen <gthelen@google.com>
> ---
> Note: This will apply to net tree when it has synced with Linus tree.

Applied.

      parent reply	other threads:[~2016-10-07  0:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-05 19:13 [PATCH net] netlink: do not enter direct reclaim from netlink_dump() Eric Dumazet
2016-10-05 19:54 ` Greg
2016-10-05 22:24 ` Alexei Starovoitov
2016-10-05 23:30   ` Eric Dumazet
2016-10-05 23:59     ` Alexei Starovoitov
2016-10-05 23:35   ` Eric Dumazet
2016-10-05 23:44     ` Alexei Starovoitov
2016-10-07  0:53 ` David Miller [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=20161006.205355.1211690896171215733.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ast@kernel.org \
    --cc=eric.dumazet@gmail.com \
    --cc=gthelen@google.com \
    --cc=netdev@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).