Skip to content

Commit 961c613

Browse files
Vasily Averindavem330
authored andcommitted
net: enable memcg accounting for veth queues
veth netdevice defines own rx queues and allocates array containing up to 4095 ~750-bytes-long 'struct veth_rq' elements. Such allocation is quite huge and should be accounted to memcg. Signed-off-by: Vasily Averin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b97af72 commit 961c613

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/veth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ static int veth_alloc_queues(struct net_device *dev)
13751375
struct veth_priv *priv = netdev_priv(dev);
13761376
int i;
13771377

1378-
priv->rq = kcalloc(dev->num_rx_queues, sizeof(*priv->rq), GFP_KERNEL);
1378+
priv->rq = kcalloc(dev->num_rx_queues, sizeof(*priv->rq), GFP_KERNEL_ACCOUNT);
13791379
if (!priv->rq)
13801380
return -ENOMEM;
13811381

0 commit comments

Comments
 (0)