[Devel] [PATCH RHEL COMMIT] ms/memcg: enable accounting for VLAN group array

Konstantin Khorenko khorenko at virtuozzo.com
Tue Sep 28 14:05:13 MSK 2021


The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after ark-5.14
------>
commit 971d43702125904f2cd9145b62422b840689b504
Author: Vasily Averin <vvs at virtuozzo.com>
Date:   Tue Sep 28 14:05:12 2021 +0300

    ms/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 at virtuozzo.com>
    
    Signed-off-by: David S. Miller <davem at davemloft.net>
    (cherry picked from commit a89893dd7b08fa85bcf643ca742ab388e001c08e)
    https://jira.sw.ru/browse/PSBM-133990
    Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
---
 net/8021q/vlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 


More information about the Devel mailing list