From: David Miller <davem@davemloft.net>
To: ast@fb.com
Cc: edumazet@google.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: ethtool: silence kmalloc warning
Date: Mon, 30 Jan 2017 15:50:06 -0500 (EST) [thread overview]
Message-ID: <20170130.155006.811869833463169479.davem@davemloft.net> (raw)
In-Reply-To: <1485652625-2881838-1-git-send-email-ast@fb.com>
From: Alexei Starovoitov <ast@fb.com>
Date: Sat, 28 Jan 2017 17:17:05 -0800
> under memory pressure 'ethtool -S' command may warn:
> [ 2374.385195] ethtool: page allocation failure: order:4, mode:0x242c0c0
...
> ~1160 mlx5 counters ~= order 4 allocation which is unlikely to succeed
> under memory pressure. Since 'get stats' command is not critical
> avoid reclaim and warning.
> Also convert to safer kmalloc_array.
>
> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Let's just fix this right, just like in ethtool_get_regs().
Just use vzalloc() unconditionally. It is an entirely similar
situation. But please be careful with the size calculations when
you make this adjustment.
Thank you.
prev parent reply other threads:[~2017-01-30 20:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-29 1:17 [PATCH net-next] net: ethtool: silence kmalloc warning Alexei Starovoitov
2017-01-30 20:50 ` 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=20170130.155006.811869833463169479.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ast@fb.com \
--cc=edumazet@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).