[PATCH] perf/arm-cmn: Reduce stack usage during discovery

Will Deacon will at kernel.org
Fri Jul 4 10:44:19 PDT 2025


On Fri, 27 Jun 2025 18:42:39 +0100, Robin Murphy wrote:
> Arnd reports that Clang's aggressive inlining of arm_cmn_discover() can
> lead to stack frame size warnings, and while we could simply prevent
> such inlining to hide the issue, it seems more productive to actually
> heed the warning and do something about the overall stack footprint.
> The xp_region array is already rather large, and CMN_MAX_XPS might only
> grow larger in future, however it only serves as a convenience to save
> repeating the first level's worth of register reads in the second pass
> of discovery. There's no performance concern here, and it only takes a
> small tweak to the flow to re-extract the offsets instead of stashing
> them, so let's just do that and save several hundred bytes of stack.
> 
> [...]

Applied to will (for-next/perf), thanks!

[1/1] perf/arm-cmn: Reduce stack usage during discovery
      https://git.kernel.org/will/c/a7bfae21457c

Cheers,
-- 
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev



More information about the linux-arm-kernel mailing list