[Devel] [PATCH RH7] net/mlx5: suppress high order allocation warning in mlx5_frag_buf_alloc_node()

Vasily Averin vvs at virtuozzo.com
Tue Jul 28 10:54:32 MSK 2020


[   16.850796] IPv6: ADDRCONF(NETDEV_CHANGE): enp24s0f0: link becomes ready
[   16.997441] ------------[ cut here ]------------
[   16.997450] WARNING: CPU: 0 PID: 9668 at mm/page_alloc.c:3548 __alloc_pages_nodemask+0x1b1/0x600
[   16.997453] order 4 >= 3, gfp 0xc0d0
[   16.997538] CPU: 0 PID: 9668 Comm: ip ve: 0 Not tainted 3.10.0-1127.8.2.vz7.158.3 #1 158.3
[   16.997542] Hardware name: Intel Corporation S2600WFQ/S2600WFQ, BIOS SE5C620.86B.00.01.0015.110720180833 11/07/2018
[   16.997544] Call Trace:
[   16.997551]  [<ffffffff909b67f1>] dump_stack+0x19/0x1b
[   16.997556]  [<ffffffff9029d168>] __warn+0xd8/0x100
[   16.997559]  [<ffffffff9029d1ef>] warn_slowpath_fmt+0x5f/0x80
[   16.997564]  [<ffffffff902be5f4>] ? wake_up_worker+0x24/0x30
[   16.997568]  [<ffffffff902befc5>] ? insert_work+0x65/0xa0
[   16.997572]  [<ffffffff903de901>] __alloc_pages_nodemask+0x1b1/0x600
[   16.997577]  [<ffffffff909bd1c5>] ? wait_for_completion_timeout+0x125/0x140
[   16.997590]  [<ffffffffc029af23>] ? free_msg+0x43/0x60 [mlx5_core]
[   16.997597]  [<ffffffffc029e0fd>] ? cmd_exec+0x42d/0x860 [mlx5_core]
[   16.997602]  [<ffffffff90434568>] alloc_pages_current+0x98/0x110
[   16.997608]  [<ffffffff903fdf48>] kmalloc_order+0x18/0x40
[   16.997611]  [<ffffffff903fdf96>] kmalloc_order_trace+0x26/0xa0
[   16.997615]  [<ffffffff90444421>] __kmalloc+0x281/0x2a0
[   16.997627]  [<ffffffffc02a6aa1>] mlx5_frag_buf_alloc_node+0x61/0x320 [mlx5_core]
[   16.997636]  [<ffffffffc02a68d9>] ? mlx5_db_alloc_node+0x69/0x1b0 [mlx5_core]
[   16.997648]  [<ffffffffc02b92ca>] mlx5_cqwq_create+0xaa/0x1c0 [mlx5_core]
[   16.997659]  [<ffffffffc02beeba>] mlx5e_alloc_cq_common+0x7a/0x130 [mlx5_core]
[   16.997671]  [<ffffffffc02c1f71>] mlx5e_open_cq.isra.50+0x81/0x100 [mlx5_core]
[   16.997681]  [<ffffffffc02c38ee>] mlx5e_open_channels+0x49e/0xd60 [mlx5_core]
[   16.997690]  [<ffffffffc07b5089>] ? mlx5_netdev_event+0x69/0x260 [mlx5_ib]
[   16.997701]  [<ffffffffc02c58dd>] mlx5e_open_locked+0x2d/0xb0 [mlx5_core]
[   16.997710]  [<ffffffffc02c5988>] mlx5e_open+0x28/0xb0 [mlx5_core]
[   16.997715]  [<ffffffff9088cb12>] __dev_open+0xd2/0x150
[   16.997719]  [<ffffffff9088ce43>] __dev_change_flags+0xa3/0x180
[   16.997723]  [<ffffffff9088cf49>] dev_change_flags+0x29/0x60
[   16.997727]  [<ffffffff908a0655>] do_setlink+0x385/0xe50
[   16.997732]  [<ffffffff90235b39>] ? sched_clock+0x9/0x10
[   16.997736]  [<ffffffff908a1e02>] rtnl_newlink+0x532/0x890
[   16.997740]  [<ffffffff908a19d3>] ? rtnl_newlink+0x103/0x890
[   16.997744]  [<ffffffff903e3bc7>] ? lru_cache_add_active_or_unevictable+0x27/0xb0
[   16.997749]  [<ffffffff90440100>] ? get_partial_node.isra.58+0x10/0x160
[   16.997754]  [<ffffffff9052ee2e>] ? security_capable+0x1e/0x20
[   16.997758]  [<ffffffff902abc19>] ? ns_capable+0x29/0x50
[   16.997762]  [<ffffffff908a2225>] rtnetlink_rcv_msg+0xc5/0x280
[   16.997766]  [<ffffffff9044669c>] ? __kmalloc_node_track_caller+0x27c/0x300
[   16.997770]  [<ffffffff9052f0e4>] ? security_inode_alloc+0x24/0x30
[   16.997774]  [<ffffffff908717bd>] ? __alloc_skb+0x8d/0x2d0
[   16.997777]  [<ffffffff908a2160>] ? rtnl_newlink+0x890/0x890
[   16.997782]  [<ffffffff908c623b>] netlink_rcv_skb+0xab/0xc0
[   16.997786]  [<ffffffff9089c528>] rtnetlink_rcv+0x28/0x30
[   16.997789]  [<ffffffff908c5b9c>] netlink_unicast+0x1bc/0x240
[   16.997794]  [<ffffffff905c8242>] ? memcpy_fromiovec+0x62/0xb0
[   16.997797]  [<ffffffff908c5f6e>] netlink_sendmsg+0x34e/0x460
[   16.997803]  [<ffffffff9045fee8>] ? __memcg_kmem_put_cache+0x38/0x70
[   16.997807]  [<ffffffff908674c0>] sock_sendmsg+0xb0/0xf0
[   16.997812]  [<ffffffff904f2a32>] ? proc_lookup_de+0xd2/0xe0
[   16.997816]  [<ffffffff908683b9>] ___sys_sendmsg+0x3e9/0x400
[   16.997820]  [<ffffffff908663df>] ? sock_destroy_inode+0x2f/0x40
[   16.997825]  [<ffffffff9048e0db>] ? destroy_inode+0x3b/0x60
[   16.997830]  [<ffffffff90488165>] ? dentry_free+0x35/0x40
[   16.997833]  [<ffffffff904881d3>] ? d_free+0x63/0x80
[   16.997836]  [<ffffffff90489028>] ? __dentry_kill+0x168/0x1e0
[   16.997841]  [<ffffffff90493ea4>] ? mntput+0x24/0x40
[   16.997845]  [<ffffffff90869a41>] __sys_sendmsg+0x51/0x90
[   16.997848]  [<ffffffff90869a92>] SyS_sendmsg+0x12/0x20
[   16.997852]  [<ffffffff909c9fd2>] system_call_fastpath+0x25/0x2a

https://pmc.acronis.com/browse/VSTOR-35452
Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/alloc.c b/drivers/net/ethernet/mellanox/mlx5/core/alloc.c
index 456f30007ad6..677663875307 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/alloc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/alloc.c
@@ -125,8 +125,8 @@ int mlx5_frag_buf_alloc_node(struct mlx5_core_dev *dev, int size,
 	buf->size = size;
 	buf->npages = DIV_ROUND_UP(size, PAGE_SIZE);
 	buf->page_shift = PAGE_SHIFT;
-	buf->frags = kcalloc(buf->npages, sizeof(struct mlx5_buf_list),
-			     GFP_KERNEL);
+	buf->frags = kvcalloc(buf->npages, sizeof(struct mlx5_buf_list),
+			      GFP_KERNEL);
 	if (!buf->frags)
 		goto err_out;
 
-- 
2.17.1



More information about the Devel mailing list