summaryrefslogtreecommitdiffstats
path: root/samples/mic
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2017-01-21 17:26:13 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-23 22:10:38 +0100
commitb8a943e2942296aad37a8e7adc43db493413e54b (patch)
tree60d9d1e583a232e729f965670b2e21dd14a6bc84 /samples/mic
parentbpf: Add tests for the lpm trie map (diff)
downloadlinux-b8a943e2942296aad37a8e7adc43db493413e54b.tar.xz
linux-b8a943e2942296aad37a8e7adc43db493413e54b.zip
samples/bpf: add lpm-trie benchmark
Extend the map_perf_test_{user,kern}.c infrastructure to stress test lpm-trie lookups. We hook into the kprobe on sys_gettid() and measure the latency depending on trie size and lookup count. On my Intel Haswell i7-6400U, a single gettid() syscall with an empty bpf program takes roughly 6.5us on my system. Lookups in empty tries take ~1.8us on first try, ~0.9us on retries. Lookups in tries with 8192 entries take ~7.1us (on the first _and_ any subsequent try). Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Daniel Mack <daniel@zonque.org> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'samples/mic')
0 files changed, 0 insertions, 0 deletions