diff options
author | Vasily Averin <vvs@virtuozzo.com> | 2021-07-19 13:44:44 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-07-20 06:00:38 -0700 |
commit | a89893dd7b08fa85bcf643ca742ab388e001c08e (patch) | |
tree | 11ee565890af5cedf82349ee836d1eeebf6cf632 /net/8021q | |
parent | 990c74e3f41d7ae9711d3fb3e8b3f0d3088e0969 (diff) | |
download | lwn-a89893dd7b08fa85bcf643ca742ab388e001c08e.tar.gz lwn-a89893dd7b08fa85bcf643ca742ab388e001c08e.zip |
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>
Diffstat (limited to 'net/8021q')
-rw-r--r-- | net/8021q/vlan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 4cdf8416869d..55275ef9a31a 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -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; |