diff options
author | Martin KaFai Lau <kafai@fb.com> | 2017-04-14 10:30:30 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-17 13:55:52 -0400 |
commit | 3a5795b83d578cc542a92c94399946258cf1a2af (patch) | |
tree | f5d017cbdf7cd49aaa75c17c97abc4a3346f1237 /MAINTAINERS | |
parent | 695ba2651a2ecbb336145f9cc033c85b9c6a5cee (diff) |
bpf: lru: Add map-in-map LRU example
This patch adds a map-in-map LRU example.
If we know only a subset of cores will use the
LRU, we can allocate a common LRU list per targeting core
and store it into an array-of-hashs.
It allows using the common LRU map with map-update performance
comparable to the BPF_F_NO_COMMON_LRU map but without wasting memory
on the unused cores that we know they will never access the LRU map.
BPF_F_NO_COMMON_LRU:
> map_perf_test 32 8 10000000 10000000 | awk '{sum += $3}END{print sum}'
9234314 (9.23M/s)
map-in-map LRU:
> map_perf_test 512 8 1260000 80000000 | awk '{sum += $3}END{print sum}'
9962743 (9.96M/s)
Notes that the max_entries for the map-in-map LRU test is 1260000 which
is the max_entries for each inner LRU map. 8 processes have been
started, so 8 * 1260000 = 10080000 (~10M) which is close to what is
used in the BPF_F_NO_COMMON_LRU test.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'MAINTAINERS')
0 files changed, 0 insertions, 0 deletions