summaryrefslogtreecommitdiffstats
path: root/scripts/genksyms
diff options
context:
space:
mode:
authorMartin KaFai Lau <kafai@fb.com>2017-08-31 23:27:13 -0700
committerDavid S. Miller <davem@davemloft.net>2017-09-01 09:57:39 -0700
commitbb9b9f8802212d98e70c63045b1734162945eaa5 (patch)
tree271be828c272d07ad318ee244e27dd77c38bb34e /scripts/genksyms
parentcc555421bc118edd070f41258d6f55f1ccfc2558 (diff)
downloadlinux-bb9b9f8802212d98e70c63045b1734162945eaa5.tar.bz2
bpf: Only set node->ref = 1 if it has not been set
This patch writes 'node->ref = 1' only if node->ref is 0. The number of lookups/s for a ~1M entries LRU map increased by ~30% (260097 to 343313). Other writes on 'node->ref = 0' is not changed. In those cases, the same cache line has to be changed anyway. First column: Size of the LRU hash Second column: Number of lookups/s Before: > echo "$((2**20+1)): $(./map_perf_test 1024 1 $((2**20+1)) 10000000 | awk '{print $3}')" 1048577: 260097 After: > echo "$((2**20+1)): $(./map_perf_test 1024 1 $((2**20+1)) 10000000 | awk '{print $3}')" 1048577: 343313 Signed-off-by: Martin KaFai Lau <kafai@fb.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'scripts/genksyms')
0 files changed, 0 insertions, 0 deletions