Re: [PATCH][V2] select: do_pollfd: add unlikely branch hint return path
From: Christian Brauner
Date: Fri Apr 11 2025 - 10:00:19 EST
On Wed, 09 Apr 2025 16:55:10 +0100, Colin Ian King wrote:
> Adding an unlikely() hint on the fd < 0 comparison return path improves
> run-time performance of the poll() system call. gcov based coverage
> analysis based on running stress-ng and a kernel build shows that this
> path return path is highly unlikely.
>
> Benchmarking on an Debian based Intel(R) Core(TM) Ultra 9 285K with
> a 6.15-rc1 kernel and a poll of 1024 file descriptors with zero timeout
> shows an call reduction from 32818 ns down to 32635 ns, which is a ~0.5%
> performance improvement.
>
> [...]
Applied to the vfs-6.16.misc branch of the vfs/vfs.git tree.
Patches in the vfs-6.16.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs-6.16.misc
[1/1] select: do_pollfd: add unlikely branch hint return path
https://git.kernel.org/vfs/vfs/c/5730609ffd7e