samples/bpf: add bpf map stress test
authorAlexei Starovoitov <ast@fb.com>
Tue, 8 Mar 2016 23:07:52 +0000 (15:07 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Mar 2016 04:22:02 +0000 (23:22 -0500)
commit9d8b612d88e81c2cf7dbc0d4a827da6ca0d848e0
tree224ffcb5af7fa6d63fc1e25abd718e59667b14f8
parente28e87ed474c5a0b378c66fb85efc8e487f4f63f
samples/bpf: add bpf map stress test

this test calls bpf programs from different contexts:
from inside of slub, from rcu, from pretty much everywhere,
since it kprobes all spin_lock functions.
It stresses the bpf hash and percpu map pre-allocation,
deallocation logic and call_rcu mechanisms.
User space part adding more stress by walking and deleting map elements.

Note that due to nature bpf_load.c the earlier kprobe+bpf programs are
already active while loader loads new programs, creates new kprobes and
attaches them.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
samples/bpf/Makefile
samples/bpf/spintest_kern.c [new file with mode: 0644]
samples/bpf/spintest_user.c [new file with mode: 0644]