* [merged mm-stable] mm-mincore-improve-performance-by-adding-an-unlikely-hint.patch removed from -mm tree
@ 2025-03-17 5:13 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2025-03-17 5:13 UTC (permalink / raw)
To: mm-commits, willy, colin.i.king, akpm
The quilt patch titled
Subject: mm/mincore: improve performance by adding an unlikely hint
has been removed from the -mm tree. Its filename was
mm-mincore-improve-performance-by-adding-an-unlikely-hint.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Colin Ian King <colin.i.king@gmail.com>
Subject: mm/mincore: improve performance by adding an unlikely hint
Date: Wed, 19 Feb 2025 08:36:07 +0000
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>
---
mm/mincore.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/mincore.c~mm-mincore-improve-performance-by-adding-an-unlikely-hint
+++ a/mm/mincore.c
@@ -239,7 +239,7 @@ SYSCALL_DEFINE3(mincore, unsigned long,
start = untagged_addr(start);
/* Check the start address: needs to be page-aligned.. */
- if (start & ~PAGE_MASK)
+ if (unlikely(start & ~PAGE_MASK))
return -EINVAL;
/* ..and we need to be passed a valid user-space range */
_
Patches currently in -mm which might be from colin.i.king@gmail.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-03-17 5:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-17 5:13 [merged mm-stable] mm-mincore-improve-performance-by-adding-an-unlikely-hint.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.