[Devel] [PATCH RH8 1/6] memcg: disable memcg accounting for nf_ct hash tables

Vasily Averin vvs at virtuozzo.com
Mon Apr 12 13:26:17 MSK 2021


vz8 does not use per-container conntracks hash tables,
all nf_ct_alloc_hashtable() calls allocates global hash tables only.

Fixes: 06fac184ac6 ("memcg: charge kmem allocations accounted to UBC in PCS6 to memcg")
https://jira.sw.ru/browse/PSBM-120694
Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
---
 net/netfilter/nf_conntrack_core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 78a656cfe8c1..7bf2e49d441c 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -2477,10 +2477,10 @@ void *nf_ct_alloc_hashtable(unsigned int *sizep, int nulls)
 		return NULL;
 
 	sz = nr_slots * sizeof(struct hlist_nulls_head);
-	hash = (void *)__get_free_pages(GFP_KERNEL_ACCOUNT | __GFP_NOWARN | __GFP_ZERO,
+	hash = (void *)__get_free_pages(GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO,
 					get_order(sz));
 	if (!hash)
-		hash = vzalloc_account(sz);
+		hash = vzalloc(sz);
 
 	if (hash && nulls)
 		for (i = 0; i < nr_slots; i++)
-- 
2.25.1



More information about the Devel mailing list