[PATCH 2/3] Provide and use an always inline version of finish_task_switch

Rik van Riel riel at surriel.com
Fri Oct 24 14:36:06 PDT 2025


On Sat, 2025-10-25 at 02:35 +0800, Xie Yuanbin wrote:
> finish_task_switch is called during context switching,
> inlining it can bring some performance benefits.
> 
> Add an always inline version `finish_task_switch_ainline` to be
> called
> during context switching, and keep the original version for being
> called
> elsewhere, so as to take into account the size impact.

Does that actually work, or does the compiler
still inline some of those "non-inlined" versions,
anyway?

Also, what kind of performance improvement
have you measured with these changes?

-- 
All Rights Reversed.



More information about the linux-riscv mailing list