mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-06 05:02:31 +00:00
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: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
990c74e3f4
commit
a89893dd7b
@ -67,7 +67,7 @@ static int vlan_group_prealloc_vid(struct vlan_group *vg,
|
||||
return 0;
|
||||
|
||||
size = sizeof(struct net_device *) * VLAN_GROUP_ARRAY_PART_LEN;
|
||||
array = kzalloc(size, GFP_KERNEL);
|
||||
array = kzalloc(size, GFP_KERNEL_ACCOUNT);
|
||||
if (array == NULL)
|
||||
return -ENOBUFS;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user