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
WARNING: multiple messages have this Message-ID (diff)
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>,
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
next prev parent reply other threads:[~2021-08-27 16:07 UTC|newest]
Thread overview: 6+ 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 9:45 ` Christophe Leroy
2021-08-27 14:18 ` Peter Zijlstra
2021-08-27 14:18 ` Peter Zijlstra
2021-08-27 16:04 ` Segher Boessenkool [this message]
2021-08-27 16:04 ` Segher Boessenkool
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.crashing.org \
--cc=ardb@kernel.org \
--cc=jbaron@akamai.com \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.