[Devel] [PATCH RHEL8 COMMIT] memcg: enable accounting for netdev_rx_queue objects

Konstantin Khorenko khorenko at virtuozzo.com
Tue Apr 13 13:20:35 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-240.1.1.vz8.5.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-240.1.1.vz8.5.12
------>
commit 9d62f617389d315e8cacb4fe649922e3c44e35f4
Author: Vasily Averin <vvs at virtuozzo.com>
Date:   Tue Apr 13 13:20:35 2021 +0300

    memcg: enable accounting for netdev_rx_queue objects
    
    Network device can allocate up to 4096 RX queues,
    so it makes sense to account them like TX queues.
    
    https://jira.sw.ru/browse/PSBM-120694
    Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
---
 net/core/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index b18ea32ea187..3b4877d93a4e 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -8778,7 +8778,7 @@ static int netif_alloc_rx_queues(struct net_device *dev)
 
 	BUG_ON(count < 1);
 
-	rx = kvzalloc(sz, GFP_KERNEL | __GFP_RETRY_MAYFAIL);
+	rx = kvzalloc(sz, GFP_KERNEL_ACCOUNT | __GFP_RETRY_MAYFAIL);
 	if (!rx)
 		return -ENOMEM;
 


More information about the Devel mailing list