Commit a89893dd authored by Vasily Averin's avatar Vasily Averin Committed by David S. Miller

memcg: enable accounting for VLAN group array

vlan array consume up to 8 pages of memory per net device.

It makes sense to account for them to restrict the host's memory
consumption from inside the memcg-limited container.
Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 990c74e3
...@@ -67,7 +67,7 @@ static int vlan_group_prealloc_vid(struct vlan_group *vg, ...@@ -67,7 +67,7 @@ static int vlan_group_prealloc_vid(struct vlan_group *vg,
return 0; return 0;
size = sizeof(struct net_device *) * VLAN_GROUP_ARRAY_PART_LEN; size = sizeof(struct net_device *) * VLAN_GROUP_ARRAY_PART_LEN;
array = kzalloc(size, GFP_KERNEL); array = kzalloc(size, GFP_KERNEL_ACCOUNT);
if (array == NULL) if (array == NULL)
return -ENOBUFS; return -ENOBUFS;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment