[Devel] [PATCH RH8 6/6] memcg: enable accounting for netdev_rx_queue objects

Vasily Averin vvs at virtuozzo.com
Mon Apr 12 13:27:01 MSK 2021


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;
 
-- 
2.25.1



More information about the Devel mailing list