bpf: Memcg-based memory accounting for bpf progs
authorRoman Gushchin <guro@fb.com>
Tue, 1 Dec 2020 21:58:31 +0000 (13:58 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 3 Dec 2020 02:28:06 +0000 (18:28 -0800)
commitddf8503c7c434374a1112e89bcedfe1ccb3057df
treeff6d3472f961844d69f589996d85fe6b54f40ea3
parent18b2db3b0385226b71cb3288474fa5a6e4a45474
bpf: Memcg-based memory accounting for bpf progs

Include memory used by bpf programs into the memcg-based accounting.
This includes the memory used by programs itself, auxiliary data,
statistics and bpf line info. A memory cgroup containing the
process which loads the program is getting charged.

Signed-off-by: Roman Gushchin <guro@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20201201215900.3569844-6-guro@fb.com
kernel/bpf/core.c