Re: [PATCH] entry: fix compile error in dynamic_irqentry_exit_cond_resched()
From: Sven Schnelle
Date: Wed Mar 30 2022 - 06:01:45 EST
Mark Rutland <mark.rutland@xxxxxxx> writes:
>> I was wondering whether we can make dynamic_irqentry_exit_cond_resched()
>> static, so it gets inlined. On s390 the compiler generates a branch to
>> that function just to return immediately if the static key isn't enabled.
>> With static it would get inlined, and therefore save one function call.
>> What do you think?
>
> I appreciate that it saves one call, but does that actually matter in practice,
> given this is called only once per interrupt?
>
> I'm not fundamentally opposed to changing it, but doing so would make it
> different from all the other dynamic_*() cases which need the check to be
> out-of-line to avoid bloating the callers, and it's not clear to me that we'd
> gain much by doing so.
>
> FWIW, on arm64 we had some additional conditions we have to check, so we roll
> our own (out-of-line) implementation anyway. So doing something arch-specific
> is also an option.
I didn't measure it, i just noticed it by looking at the generated code.
Given your argument about consistency with the other functions i think
we leave it that way.
Thanks!
Sven