Skip to content

Commit

Permalink
doc: remember to enable JITing of the BPF code
Browse files Browse the repository at this point in the history
Also document how to see what kind of JIT support the
different CPU arch's have available in the kernel git tree.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
  • Loading branch information
netoptimizer committed Mar 17, 2017
1 parent d260132 commit ff51c31
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions kernel/Documentation/bpf/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,33 @@ permitted) when the RLIMIT_MEMLOCK memory size limit is exceeded.

.. _setrlimit(2): http://man7.org/linux/man-pages/man2/setrlimit.2.html

Enable bpf JIT
==============

Not seeing the expected performance and perf top showing
``__bpf_prog_run()`` as the top CPU consumer.

Did you remember to enable JIT'ing of the BPF code?
Like::

$ sysctl net/core/bpf_jit_enable=1
net.core.bpf_jit_enable = 1

Notice there is both JIT'ing of eBPF and cBPF (Classical BPF)
implemented in the kernel per arch. You can see current cBPF and eBPF
JITs that are supported by the kernel via::

$ git grep BPF_JIT | grep select
arch/arm/Kconfig: select HAVE_CBPF_JIT
arch/arm64/Kconfig: select HAVE_EBPF_JIT
arch/mips/Kconfig: select HAVE_CBPF_JIT if !CPU_MICROMIPS
arch/powerpc/Kconfig: select HAVE_CBPF_JIT if !PPC64
arch/powerpc/Kconfig: select HAVE_EBPF_JIT if PPC64
arch/s390/Kconfig: select HAVE_EBPF_JIT if PACK_STACK && HAVE_MARCH_Z196_FEATURES
arch/sparc/Kconfig: select HAVE_CBPF_JIT
arch/x86/Kconfig: select HAVE_EBPF_JIT if X86_64


ELF binary
==========

Expand Down

0 comments on commit ff51c31

Please sign in to comment.