1
0
Fork 0

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@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20201201215900.3569844-18-guro@fb.com
zero-sugar-mainline-defconfig
Roman Gushchin 2020-12-01 13:58:43 -08:00 committed by Alexei Starovoitov
parent 7846dd9f83
commit 28e1dcdef0
1 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,8 @@ static struct xsk_map_node *xsk_map_node_alloc(struct xsk_map *map,
{
struct xsk_map_node *node;
node = kzalloc(sizeof(*node), GFP_ATOMIC | __GFP_NOWARN);
node = bpf_map_kzalloc(&map->map, sizeof(*node),
GFP_ATOMIC | __GFP_NOWARN);
if (!node)
return ERR_PTR(-ENOMEM);