Skip to contentSkip to conversation

syscalls/bpf: bump RLIMIT_MEMLOCK limit

PATCH New Jan Stancek 2 participants 3 messages Feb 27, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 syscalls/bpf: bump RLIMIT_MEMLOCK limit

Some bpf array types reserve space according to number of possible CPUs. This is running into limits on a ppc64le with 64k pages and NR_CPUS==2048:

    84 bpf_map01(1049142):   <-bpf_map_init_from_attr
    89 bpf_map01(1049142):   ->bpf_map_charge_init mem={.pages=0, .user=0x0} size=208456
    94 bpf_map01(1049142):   <-bpf_map_charge_init return=0xffffffffffffffff
---
 testcases/kernel/syscalls/bpf/bpf_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/bpf/bpf_common.h +1 -1
index 1dbbd5f25635..d36a2b09ffd9 100644
@@ -6,7 +6,7 @@
 #ifndef LTP_BPF_COMMON_H
 #define LTP_BPF_COMMON_H
 
-#define BPF_MEMLOCK_ADD (256*1024)
+#define BPF_MEMLOCK_ADD (2*1024*1024)
 
 void rlimit_bump_memlock(void);
 int bpf_map_create(union bpf_attr *attr);
Signature · 1 line
2.18.1
#1 lore raw

PATCH 1/1 syscalls/bpf: bump RLIMIT_MEMLOCK limit

Hi!

Quoted 17 lines

Some bpf array types reserve space according to number of possible CPUs. This is running into limits on a ppc64le with 64k pages and NR_CPUS==2048:

    84 bpf_map01(1049142):   <-bpf_map_init_from_attr
    89 bpf_map01(1049142):   ->bpf_map_charge_init mem={.pages=0, .user=0x0} size=208456
    94 bpf_map01(1049142):   <-bpf_map_charge_init return=0xffffffffffffffff
---
 testcases/kernel/syscalls/bpf/bpf_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/bpf/bpf_common.h +0 -0
index 1dbbd5f25635..d36a2b09ffd9 100644

testcases/kernel/syscalls/bpf/bpf_common.h line 9

Quoted 5 lines
testcases/kernel/syscalls/bpf/bpf_common.h +1 -1
@@ -6,7 +6,7 @@
 #ifndef LTP_BPF_COMMON_H
 #define LTP_BPF_COMMON_H
 
-#define BPF_MEMLOCK_ADD (256*1024)
+#define BPF_MEMLOCK_ADD (2*1024*1024)

Looks still reasonably small so that we can raise it unconditionally, acked.

Signature · 2 lines
Cyril Hrubis
[email protected]
#2 lore raw

PATCH 1/1 syscalls/bpf: bump RLIMIT_MEMLOCK limit

----- Original Message -----

Quoted 2 lines

Looks still reasonably small so that we can raise it unconditionally, acked.

Pushed.