From afb43c156f80cc56146b03dba6a42efd0dc7194a Mon Sep 17 00:00:00 2001 From: Gary Berger Date: Wed, 22 Mar 2017 12:31:21 -0400 Subject: [PATCH] Updated RLIMIT_MEMLOCK to account for pushing RLIMIT to RLIM_INFINITY --- kernel/Documentation/bpf/troubleshooting.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/kernel/Documentation/bpf/troubleshooting.rst b/kernel/Documentation/bpf/troubleshooting.rst index 5ceb857..0c41a7a 100644 --- a/kernel/Documentation/bpf/troubleshooting.rst +++ b/kernel/Documentation/bpf/troubleshooting.rst @@ -8,11 +8,9 @@ programs. With a primary focus on programs under kernels samples/bpf. Memory ulimits ============== -The eBPF maps uses locked memory, which is default very low. -Your program likely need to increase resource limit ``RLIMIT_MEMLOCK`` -see system call `setrlimit(2)`_. +The eBPF maps uses locked memory. A typical Ubuntu system will set RLIMIT to 64k `uname -l`. -The ``bpf_create_map`` call will return errno EPERM (Operation not +The ``bpf_create_map`` call will set the RLIMIT_MEMLOCK to RLIM_INFINITY and will return errno EPERM (Operation not permitted) when the RLIMIT_MEMLOCK memory size limit is exceeded. .. _setrlimit(2): http://man7.org/linux/man-pages/man2/setrlimit.2.html