[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210827160436.GQ1583@gate.crashing.org>
Date: Fri, 27 Aug 2021 11:04:36 -0500
From: Segher Boessenkool <segher@...nel.crashing.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Christophe Leroy <christophe.leroy@...roup.eu>,
linux-kernel@...r.kernel.org, Steven Rostedt <rostedt@...dmis.org>,
Jason Baron <jbaron@...mai.com>,
Paul Mackerras <paulus@...ba.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
linuxppc-dev@...ts.ozlabs.org, Ard Biesheuvel <ardb@...nel.org>
Subject: Re: [RFC PATCH] powerpc: Investigate static_call concept
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:
> > 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
Powered by blists - more mailing lists