diff options
author | Coly Li <colyli@suse.de> | 2019-06-28 14:59:31 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-06-28 16:39:14 +0300 |
commit | f960facb399ece6ff88a7a2d4b4a5515e3a467a0 (patch) | |
tree | 3ea70ddbfa4c7e767df4bbd7747074fb2016385a /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 08ec1e6282f271698f0053983fab89de6e1a8217 (diff) | |
download | linux-f960facb399ece6ff88a7a2d4b4a5515e3a467a0.tar.xz |
bcache: remove unnecessary prefetch() in bset_search_tree()
In function bset_search_tree(), when p >= t->size, t->tree[0] will be
prefetched by the following code piece,
974 unsigned int p = n << 4;
975
976 p &= ((int) (p - t->size)) >> 31;
977
978 prefetch(&t->tree[p]);
The purpose of the above code is to avoid a branch instruction, but
when p >= t->size, prefetch(&t->tree[0]) has no positive performance
contribution at all. This patch avoids the unncessary prefetch by only
calling prefetch() when p < t->size.
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions