Commit 50053de
readdir: add unlikely hint on len check
Currently the out of bounds check for the length is very unlikely
to be false for valid name strings. Analysis with gcov coverage show
this to be so.
Add an unlikely hint on the error return path check. This improves
performance when testing with single instance stress-ng dentry and
dirent stressors. Tested with a 6.15 kernel, built with gcc 14.2.0
on a Debian Ultra 9 285K system with turbo disabled to reduce test
jitter on tmpfs. Each test case was run 25 times and the % standard
deviation was less than 0.4%. Geometric mean of 25 results show the
following stress-ng bogo-ops performance improvments:
getdent: 1.1%
dentry: 0.9%
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>1 parent 72b441f commit 50053de
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
0 commit comments