]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Eliminate rlimit-based memory accounting infra for bpf maps
authorRoman Gushchin <guro@fb.com>
Tue, 1 Dec 2020 21:58:58 +0000 (13:58 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 3 Dec 2020 02:32:47 +0000 (18:32 -0800)
commit7f532e4be4db593bb2e6f41377482d30cf61e8ac
tree12e9a54ccc6c345b03142ac0ddc80fcf7607ad14
parent54ba8140461d9183a1b9ecb699d7074fad350577
bpf: Eliminate rlimit-based memory accounting infra for bpf maps

Remove rlimit-based accounting infrastructure code, which is not used
anymore.

To provide a backward compatibility, use an approximation of the
bpf map memory footprint as a "memlock" value, available to a user
via map info. The approximation is based on the maximal number of
elements and key and value sizes.

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-33-guro@fb.com
include/linux/bpf.h
kernel/bpf/syscall.c
tools/testing/selftests/bpf/progs/bpf_iter_bpf_map.c
tools/testing/selftests/bpf/progs/map_ptr_kern.c