summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2025-02-19 11:36:07 +0300
committerAndrew Morton <akpm@linux-foundation.org>2025-03-17 08:06:32 +0300
commit9fa26fb554baaf71826814804749f5cff130c4d6 (patch)
tree0b579f5622a3f2090bafc7a8cbf81937bd62795d /include/linux
parent375c28a0df0ee8869d0980228d659d91f85455f9 (diff)
downloadlinux-9fa26fb554baaf71826814804749f5cff130c4d6.tar.xz
mm/mincore: improve performance by adding an unlikely hint
Adding an unlikely() hint on the masked start comparison error return path improves run-time performance of the mincore system call. Benchmarking on an i9-12900 shows an improvement of 7ns on mincore calls on a 256KB mmap'd region where 50% of the pages we resident. Improvement was from ~970 ns down to 963 ns, so a small ~0.7% improvement. Results based on running 20 tests with turbo disabled (to reduce clock freq turbo changes), with 10 second run per test and comparing the number of mincores calls per second. The % standard deviation of the 20 tests was ~0.10%, so results are reliable. Link: https://lkml.kernel.org/r/20250219083607.5183-1-colin.i.king@gmail.com Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Cc: Matthew Wilcow <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions