[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <6cfcd262-0fe4-4398-999c-ade674191edf@p183>
Date: Thu, 6 Feb 2025 20:11:28 +0300
From: Alexey Dobriyan <adobriyan@...il.com>
To: Mateusz Guzik <mjguzik@...il.com>
Cc: brauner@...nel.org, viro@...iv.linux.org.uk, jack@...e.cz,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] vfs: inline getname()
[cc lists and people]
> +static inline struct filename *getname(const char __user *name)
> +{
> + return getname_flags(name, 0);
> +}
This may be misguided. The reason is that if function is used often enough
then all those clears of the second argument bloat icache at the call sites.
Uninlining moves all clears in one place, shrinking callers at the cost of
additional function which (in this case) tail calls into another function.
And tailcalling is quite efficient (essentially free):
getname:
xor esi, esi
jmp getname_flags
Powered by blists - more mailing lists