bpf: add ability to charge bpf maps memory dynamically
authorRoman Gushchin <guro@fb.com>
Thu, 2 Aug 2018 21:27:17 +0000 (14:27 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 2 Aug 2018 22:47:31 +0000 (00:47 +0200)
commit0a4c58f5702858822621fa1177c7d3475f181ccb
treec101bcbfc1a4c1affe39dbded5c378c3a41fcb04
parentfbeb1603bf4e9baa82da8f794de42949d0fe5e25
bpf: add ability to charge bpf maps memory dynamically

This commits extends existing bpf maps memory charging API
to support dynamic charging/uncharging.

This is required to account memory used by maps,
if all entries are created dynamically after
the map initialization.

Signed-off-by: Roman Gushchin <guro@fb.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
include/linux/bpf.h
kernel/bpf/syscall.c