Re: [PATCH v2 3/4] Provide the always inline version of some functions

Arnd Bergmann
2025-11-09T17:35:46Z

On Sun, Nov 9, 2025, at 18:04, Xie Yuanbin wrote:
> On Sun, 9 Nov 2025 12:31:52 +0100, Peter Zijlstra wrote:
> Adding the always-inline version of these functions can provide better
> guidance for compiler optimization, but it does indeed lead to more
> complex code.
> The best solution may be to prompt the compiler to always inline at a
> specific calling point through some keyword.
> I noticed that there are also people discussing this issue on stackerflow
> , but it seems that the current compiler does not have such a feature.
> Link: https://stackoverflow.com/questions/14571593

You can mark the caller as __attribute__((flatten)) to force all
functions to be inlined into that one if possible. I don't know
if that would be helpful or desired here though.

Arnd