]> Gentwo Git Trees - linux/.git/commit
fs: move fd_install() slowpath into a dedicated routine and provide commentary
authorMateusz Guzik <mjguzik@gmail.com>
Mon, 10 Nov 2025 09:56:34 +0000 (10:56 +0100)
committerChristian Brauner <brauner@kernel.org>
Wed, 12 Nov 2025 11:19:09 +0000 (12:19 +0100)
commit9eda581bfe8a1774390dd66f365a2e00a9d27a41
treed46caac5be98e09bf08634e6357cef1a5cdabf34
parent21b561dab1406e63740ebe240c7b69f19e1bcf58
fs: move fd_install() slowpath into a dedicated routine and provide commentary

On stock kernel gcc 14 emits avoidable register spillage:
endbr64
call   ffffffff81374630 <__fentry__>
push   %r13
push   %r12
push   %rbx
sub    $0x8,%rsp
[snip]

Total fast path is 99 bytes.

Moving the slowpath out avoids it and shortens the fast path to 74
bytes.

Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Link: https://patch.msgid.link/20251110095634.1433061-1-mjguzik@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/file.c