diff options
| author | Menglong Dong <menglong8.dong@gmail.com> | 2025-10-11 04:48:55 +0300 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2025-10-20 07:10:28 +0300 |
| commit | aa653654ee67f9cbbebb7d4c18f360ad4fef3180 (patch) | |
| tree | 92478b7541c45f19bdedbb6b14f4aae5eebfe764 /scripts/patch-kernel | |
| parent | 9b04d8f00569573796dd05397f5779135593eb24 (diff) | |
| download | linux-aa653654ee67f9cbbebb7d4c18f360ad4fef3180.tar.xz | |
rhashtable: use likely for rhashtable lookup
Sometimes, the result of the rhashtable_lookup() is expected to be found.
Therefore, we can use likely() for such cases.
Following new functions are introduced, which will use likely or unlikely
during the lookup:
rhashtable_lookup_likely
rhltable_lookup_likely
A micro-benchmark is made for these new functions: lookup a existed entry
repeatedly for 100000000 times, and rhashtable_lookup_likely() gets ~30%
speedup.
Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions
