tracing

Data source tracepoints: kernel static tracing kprobes: kernel dynamic tracing uprobes: user level dynamic tracing USDT / dtrace probes These tracepoints are hard coded in interesting and logical locations of the kernel, so that higher-level behavior can be easily traced. You can find all the tracepoints in include/trace/events/ Dynamic tracing can see everything, it’s also an unstable interface since it is instrumenting raw code. cBPF used for filter. eBPF has (key/value) maps and more helper functions.

podman

Podman Basic Usage: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 $ podman search rhel $ podman pull $server/rhel7:7.5 $ podman images $ podman run -d --name $node_name ubi7/ubi:7.7 echo 'Hello!' $ podman run -d --name $node_name -it -e VAR=hi rhel /bin/bash $ podman exec -it $node_name /bin/bash $ podman exec -it -l /bin/bash $ podman inspect -f '{{ .NetworkSettings.IPAddress }}' $node_name $ podman ps --format "{{.

Kernel interrupt and lock

check latest kernel buildin kernel interrupt: https://www.cnblogs.com/aaronLinux/p/6341590.html timer: https://blog.csdn.net/njuitjf/article/details/108454786 locks: thread: BH context GFP_KERNEL/GFP_ATOMIC: spin_lock/spin_lock_bh rcu_read/write_lock RCU_INIT_POINTER()/rcu_access_pointer red-black tree..

How to compile llvm for BPF

My steps: 1 2 3 4 5 6 7 8 9 10 11 12 13 dnf install -y cmake ninja-build gcc gcc-c++ git clone https://github.com/llvm/llvm-project.git cd llvm-project/ git checkout -b llvmorg-13 llvmorg-13-init cd llvm/ mkdir build_13 cd $! cmake -G "Ninja" -DLLVM_TARGETS_TO_BUILD="BPF;X86" \ -DLLVM_ENABLE_PROJECTS="clang" \ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. ninja -j20 ninja install clang -v Here is the message from Jesper (The commands I use listed below are indented, and not prefix with $ because it makes it easier to copy-paste into your cmdline.

Get start with XDP in 20m

The XDP(eXpress Data Path) is a powerful new network feature in Linux based on eBPF, that enables high-performance programmable access to networking packets before they enter the networking stack. But it also has a high start curve to learn, many developers have written introduction blogs for this feature. e.g. Paolo Abeni’s Using XDP in RHEL8 and Toke’s Using XDP in RHEL8. As the XDP is a new technology and is still in fast-moving.