diff options
author | Anton Protopopov <aspsk@isovalent.com> | 2023-04-02 14:43:40 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-04-02 18:44:49 +0300 |
commit | 92b2e810f0d3a2c05d8cf12a800592b238d458df (patch) | |
tree | 82c98bc9cc83fee106fbc86c678fa22563cd5ea8 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 5b85575ad4280171c382e888b006cb8d12c35bde (diff) | |
download | linux-92b2e810f0d3a2c05d8cf12a800592b238d458df.tar.xz |
bpf: compute hashes in bloom filter similar to hashmap
If the value size in a bloom filter is a multiple of 4, then the jhash2()
function is used to compute hashes. The length parameter of this function
equals to the number of 32-bit words in input. Compute it in the hot path
instead of pre-computing it, as this is translated to one extra shift to
divide the length by four vs. one extra memory load of a pre-computed length.
Signed-off-by: Anton Protopopov <aspsk@isovalent.com>
Link: https://lore.kernel.org/r/20230402114340.3441-1-aspsk@isovalent.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions