projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7846dd9
)
bpf: Refine memcg-based memory accounting for xskmap maps
author
Roman Gushchin
<guro@fb.com>
Tue, 1 Dec 2020 21:58:43 +0000
(13:58 -0800)
committer
Alexei Starovoitov
<ast@kernel.org>
Thu, 3 Dec 2020 02:32:46 +0000
(18:32 -0800)
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
net/xdp/xskmap.c
patch
|
blob
|
blame
|
history
diff --git
a/net/xdp/xskmap.c
b/net/xdp/xskmap.c
index 66231ba6c3482986e18a16483668a7abe99f2ea9..9fff1e6dc9cd69ca6febaaa7ce60bc9acee0a2f6 100644
(file)
--- a/
net/xdp/xskmap.c
+++ b/
net/xdp/xskmap.c
@@
-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);