[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201117025529.1034387-18-guro@fb.com>
Date: Mon, 16 Nov 2020 18:55:12 -0800
From: Roman Gushchin <guro@...com>
To: <bpf@...r.kernel.org>
CC: <ast@...nel.org>, <daniel@...earbox.net>, <netdev@...r.kernel.org>,
<andrii@...nel.org>, <akpm@...ux-foundation.org>,
<linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
<kernel-team@...com>
Subject: [PATCH v6 17/34] bpf: refine memcg-based memory accounting for xskmap maps
Extend xskmap memory accounting to include the memory taken by
the xsk_map_node structure.
Signed-off-by: Roman Gushchin <guro@...com>
Acked-by: Song Liu <songliubraving@...com>
---
net/xdp/xskmap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/xdp/xskmap.c b/net/xdp/xskmap.c
index 49da2b8ace8b..5d11d60d7b0f 100644
--- a/net/xdp/xskmap.c
+++ b/net/xdp/xskmap.c
@@ -28,7 +28,8 @@ static struct xsk_map_node *xsk_map_node_alloc(struct xsk_map *map,
struct xsk_map_node *node;
int err;
- node = kzalloc(sizeof(*node), GFP_ATOMIC | __GFP_NOWARN);
+ node = kzalloc(sizeof(*node),
+ GFP_ATOMIC | __GFP_NOWARN | __GFP_ACCOUNT);
if (!node)
return ERR_PTR(-ENOMEM);
--
2.26.2
Powered by blists - more mailing lists