[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20170131.132918.802187583667317438.davem@davemloft.net>
Date: Tue, 31 Jan 2017 13:29:18 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: ast@...com
Cc: edumazet@...gle.com, netdev@...r.kernel.org
Subject: Re: [PATCH v2 net-next] net: ethtool: convert large order kmalloc
allocations to vzalloc
From: Alexei Starovoitov <ast@...com>
Date: Mon, 30 Jan 2017 18:25:18 -0800
> under memory pressure 'ethtool -S' command may warn:
...
> ~1160 mlx5 counters ~= order 4 allocation which is unlikely to succeed
> under memory pressure. Convert them to vzalloc() as ethtool_get_regs() does.
> Also take care of drivers without counters similar to
> commit 67ae7cf1eeda ("ethtool: Allow zero-length register dumps again")
> and reduce warn_on to warn_on_once.
>
> Signed-off-by: Alexei Starovoitov <ast@...nel.org>
> ---
> Dave, I think by 'careful about size calculations' you mean
> to take care of zero-length. Please let me know if I misunderstood.
I was talking about the transformation from "count, size" to
"count * size" when going from kcalloc() to vzalloc() which you
did properly.
Applied, thank you :)
Powered by blists - more mailing lists