diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2018-03-07 22:10:01 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-03-07 14:47:24 -0800 |
commit | 6007b080d2e2adb7af22bf29165f0594ea12b34c (patch) | |
tree | a93cdd398c0c7b0e32314272ed01421897792356 /lib/sbitmap.c | |
parent | 20d5de51e7052ae3fb645d8c5c584ee7383b2a93 (diff) | |
download | linux-6007b080d2e2adb7af22bf29165f0594ea12b34c.tar.gz linux-6007b080d2e2adb7af22bf29165f0594ea12b34c.tar.bz2 linux-6007b080d2e2adb7af22bf29165f0594ea12b34c.zip |
bpf, x64: increase number of passes
In Cilium some of the main programs we run today are hitting 9 passes
on x64's JIT compiler, and we've had cases already where we surpassed
the limit where the JIT then punts the program to the interpreter
instead, leading to insertion failures due to CONFIG_BPF_JIT_ALWAYS_ON
or insertion failures due to the prog array owner being JITed but the
program to insert not (both must have the same JITed/non-JITed property).
One concrete case the program image shrunk from 12,767 bytes down to
10,288 bytes where the image converged after 16 steps. I've measured
that this took 340us in the JIT until it converges on my i7-6600U. Thus,
increase the original limit we had from day one where the JIT covered
cBPF only back then before we run into the case (as similar with the
complexity limit) where we trip over this and hit program rejections.
Also add a cond_resched() into the compilation loop, the JIT process
runs without any locks and may sleep anyway.
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'lib/sbitmap.c')
0 files changed, 0 insertions, 0 deletions