public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel•crashing.org>
To: Peter Zijlstra <peterz@infradead•org>
Cc: linux-kernel@vger•kernel.org,
	Steven Rostedt <rostedt@goodmis•org>,
	Jason Baron <jbaron@akamai•com>,
	Paul Mackerras <paulus@samba•org>,
	Josh Poimboeuf <jpoimboe@redhat•com>,
	linuxppc-dev@lists•ozlabs.org, Ard Biesheuvel <ardb@kernel•org>
Subject: Re: [RFC PATCH] powerpc: Investigate static_call concept
Date: Fri, 27 Aug 2021 11:04:36 -0500	[thread overview]
Message-ID: <20210827160436.GQ1583@gate.crashing.org> (raw)
In-Reply-To: <YSj0R6g6HeboSk9n@hirez.programming.kicks-ass.net>

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

      reply	other threads:[~2021-08-27 16:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27  9:45 [RFC PATCH] powerpc: Investigate static_call concept Christophe Leroy
2021-08-27 14:18 ` Peter Zijlstra
2021-08-27 16:04   ` Segher Boessenkool [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210827160436.GQ1583@gate.crashing.org \
    --to=segher@kernel$(echo .)crashing.org \
    --cc=ardb@kernel$(echo .)org \
    --cc=jbaron@akamai$(echo .)com \
    --cc=jpoimboe@redhat$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=paulus@samba$(echo .)org \
    --cc=peterz@infradead$(echo .)org \
    --cc=rostedt@goodmis$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox