summaryrefslogtreecommitdiff
path: root/tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2026-01-11 13:38:21 -0800
committerMikulas Patocka <mpatocka@redhat.com>2026-01-19 15:39:21 +0100
commitbe9badced98f89cf5c6f7690f7d9739a213c4502 (patch)
treea3ddcf06be2b97d16438b659eac9a3491ab4ab09 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
parent1bf7ba4ca342ada012e7ef88274fb306e88917ad (diff)
dm-bufio: avoid redundant buffer_tree lookups
dm-bufio's map from block number to buffer is organized as a hash table of red-black trees. It does far more lookups in this hash table than necessary: typically one lookup to lock the tree, one lookup to search the tree, and one lookup to unlock the tree. Only one of those lookups is needed. Optimize it to do only the minimum number of lookups. This improves performance. It also reduces the object code size, considering that the redundant hash table lookups were being inlined. For example, the size of the text section of dm-bufio.o decreases from 15599 to 15070 bytes with gcc 15 and x86_64, or from 20652 to 20244 bytes with clang 21 and arm64. Signed-off-by: Eric Biggers <ebiggers@kernel.org> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions