Thread (3 messages) flat view 3 messages, 3 authors, 2021-08-27

Re: [RFC PATCH] powerpc: Investigate static_call concept

From: Segher Boessenkool <hidden>
Date: 2021-08-27 16:10:31
Also in: lkml

On Fri, Aug 27, 2021 at 04:18:47PM +0200, Peter Zijlstra wrote:
On Fri, Aug 27, 2021 at 09:45:37AM +0000, Christophe Leroy wrote:
quoted
This RFC is to validate the concept of static_call on powerpc.

Highly copied from x86.

It replaces ppc_md.get_irq() which is called at every IRQ, by
a static call.
The code looks saner, but does it actually improve performance? I'm
thinking the double branch also isn't free.
It isn't, but it is very cheap, while the branch-to-count is not, even
*if* it is correctly predicted.
The paranoid in me would've made it:

	BUG_ON(patch_branch(...));

just to make sure to notice the target not fitting. Ohh, patch_branch()
doesn't return the create_branch() error, perhaps that wants to be
fixed?
Should that be allowed to fail ever?  I.e., should a failure be a fatal
error?  Sounds very fragile otherwise.


Segher
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help