* [PATCH] kprobes: Mark OPTPROBES n/a for powerpc
@ 2015-07-16 10:56 Ananth N Mavinakayanahalli
2015-07-19 2:21 ` Masami Hiramatsu
0 siblings, 1 reply; 6+ messages in thread
From: Ananth N Mavinakayanahalli @ 2015-07-16 10:56 UTC (permalink / raw)
To: masami.hiramatsu.pt, mpe; +Cc: linuxppc-dev
Kprobes uses a breakpoint instruction to trap into execution flow
and the probed instruction is single-stepped from an alternate location.
On some architectures like x86, under certain conditions, the OPTPROBES
feature enables replacing the probed instruction with a jump instead,
resulting in a significant perfomance boost (one single-step exception
is bypassed for each kprobe).
Powerpc has an in-kernel instruction emulator. Kprobes on powerpc uses
this emulator already and bypasses the single-step exception, with a
lot less complexity.
Hence, mark OPTPROBES n/a for powerpc.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
---
.../features/debug/optprobes/arch-support.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/features/debug/optprobes/arch-support.txt b/Documentation/features/debug/optprobes/arch-support.txt
index b8999d8..0a3ca33 100644
--- a/Documentation/features/debug/optprobes/arch-support.txt
+++ b/Documentation/features/debug/optprobes/arch-support.txt
@@ -27,7 +27,7 @@
| nios2: | TODO |
| openrisc: | TODO |
| parisc: | TODO |
- | powerpc: | TODO |
+ | powerpc: | n/a |
| s390: | TODO |
| score: | TODO |
| sh: | TODO |
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] kprobes: Mark OPTPROBES n/a for powerpc
2015-07-16 10:56 [PATCH] kprobes: Mark OPTPROBES n/a for powerpc Ananth N Mavinakayanahalli
@ 2015-07-19 2:21 ` Masami Hiramatsu
2015-07-20 10:38 ` Ananth N Mavinakayanahalli
2015-07-21 2:53 ` Michael Ellerman
0 siblings, 2 replies; 6+ messages in thread
From: Masami Hiramatsu @ 2015-07-19 2:21 UTC (permalink / raw)
To: Ananth N Mavinakayanahalli, mpe; +Cc: linuxppc-dev
On 2015/07/16 19:56, Ananth N Mavinakayanahalli wrote:
> Kprobes uses a breakpoint instruction to trap into execution flow
> and the probed instruction is single-stepped from an alternate location.
>
> On some architectures like x86, under certain conditions, the OPTPROBES
> feature enables replacing the probed instruction with a jump instead,
> resulting in a significant perfomance boost (one single-step exception
> is bypassed for each kprobe).
The OPTPROBE is not only for bypassing the single-step exception, but also
the breakpoint exception.
Please see commit 0dc016dbd820260b (ARM: kprobes: enable OPTPROBES for ARM 32) too,
which shows how it is done on RISC processor.
> Powerpc has an in-kernel instruction emulator. Kprobes on powerpc uses
> this emulator already and bypasses the single-step exception, with a
> lot less complexity.
So, this might miss the point. Since it is impossible to do on some RISC
processor, I agree with this change, but it should be committed with
correct comments.
Thank you,
>
> Hence, mark OPTPROBES n/a for powerpc.
>
> Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> ---
> .../features/debug/optprobes/arch-support.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/features/debug/optprobes/arch-support.txt b/Documentation/features/debug/optprobes/arch-support.txt
> index b8999d8..0a3ca33 100644
> --- a/Documentation/features/debug/optprobes/arch-support.txt
> +++ b/Documentation/features/debug/optprobes/arch-support.txt
> @@ -27,7 +27,7 @@
> | nios2: | TODO |
> | openrisc: | TODO |
> | parisc: | TODO |
> - | powerpc: | TODO |
> + | powerpc: | n/a |
> | s390: | TODO |
> | score: | TODO |
> | sh: | TODO |
>
>
--
Masami HIRAMATSU
Linux Technology Research Center, System Productivity Research Dept.
Center for Technology Innovation - Systems Engineering
Hitachi, Ltd., Research & Development Group
E-mail: masami.hiramatsu.pt@hitachi.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kprobes: Mark OPTPROBES n/a for powerpc
2015-07-19 2:21 ` Masami Hiramatsu
@ 2015-07-20 10:38 ` Ananth N Mavinakayanahalli
2015-07-21 2:53 ` Michael Ellerman
1 sibling, 0 replies; 6+ messages in thread
From: Ananth N Mavinakayanahalli @ 2015-07-20 10:38 UTC (permalink / raw)
To: Masami Hiramatsu; +Cc: mpe, linuxppc-dev
On Sun, Jul 19, 2015 at 11:21:50AM +0900, Masami Hiramatsu wrote:
> On 2015/07/16 19:56, Ananth N Mavinakayanahalli wrote:
> > Kprobes uses a breakpoint instruction to trap into execution flow
> > and the probed instruction is single-stepped from an alternate location.
> >
> > On some architectures like x86, under certain conditions, the OPTPROBES
> > feature enables replacing the probed instruction with a jump instead,
> > resulting in a significant perfomance boost (one single-step exception
> > is bypassed for each kprobe).
>
> The OPTPROBE is not only for bypassing the single-step exception, but also
> the breakpoint exception.
> Please see commit 0dc016dbd820260b (ARM: kprobes: enable OPTPROBES for ARM 32) too,
> which shows how it is done on RISC processor.
Yes, will fix and send.
> > Powerpc has an in-kernel instruction emulator. Kprobes on powerpc uses
> > this emulator already and bypasses the single-step exception, with a
> > lot less complexity.
>
> So, this might miss the point. Since it is impossible to do on some RISC
> processor, I agree with this change, but it should be committed with
> correct comments.
Sure, thanks!
Ananth
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kprobes: Mark OPTPROBES n/a for powerpc
2015-07-19 2:21 ` Masami Hiramatsu
2015-07-20 10:38 ` Ananth N Mavinakayanahalli
@ 2015-07-21 2:53 ` Michael Ellerman
2015-07-21 4:34 ` Ananth N Mavinakayanahalli
1 sibling, 1 reply; 6+ messages in thread
From: Michael Ellerman @ 2015-07-21 2:53 UTC (permalink / raw)
To: Masami Hiramatsu; +Cc: Ananth N Mavinakayanahalli, linuxppc-dev
On Sun, 2015-07-19 at 11:21 +0900, Masami Hiramatsu wrote:
> On 2015/07/16 19:56, Ananth N Mavinakayanahalli wrote:
> > Kprobes uses a breakpoint instruction to trap into execution flow
> > and the probed instruction is single-stepped from an alternate location.
> >
> > On some architectures like x86, under certain conditions, the OPTPROBES
> > feature enables replacing the probed instruction with a jump instead,
> > resulting in a significant perfomance boost (one single-step exception
> > is bypassed for each kprobe).
>
> The OPTPROBE is not only for bypassing the single-step exception, but also
> the breakpoint exception.
> Please see commit 0dc016dbd820260b (ARM: kprobes: enable OPTPROBES for ARM 32) too,
> which shows how it is done on RISC processor.
>
> > Powerpc has an in-kernel instruction emulator. Kprobes on powerpc uses
> > this emulator already and bypasses the single-step exception, with a
> > lot less complexity.
>
> So, this might miss the point. Since it is impossible to do on some RISC
> processor, I agree with this change, but it should be committed with
> correct comments.
I don't think it's impossible on powerpc.
So we should leave it as a TODO for now.
cheers
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kprobes: Mark OPTPROBES n/a for powerpc
2015-07-21 2:53 ` Michael Ellerman
@ 2015-07-21 4:34 ` Ananth N Mavinakayanahalli
2015-07-21 10:26 ` Masami Hiramatsu
0 siblings, 1 reply; 6+ messages in thread
From: Ananth N Mavinakayanahalli @ 2015-07-21 4:34 UTC (permalink / raw)
To: Michael Ellerman; +Cc: Masami Hiramatsu, linuxppc-dev
On Tue, Jul 21, 2015 at 12:53:07PM +1000, Michael Ellerman wrote:
> On Sun, 2015-07-19 at 11:21 +0900, Masami Hiramatsu wrote:
> > On 2015/07/16 19:56, Ananth N Mavinakayanahalli wrote:
> > > Kprobes uses a breakpoint instruction to trap into execution flow
> > > and the probed instruction is single-stepped from an alternate location.
> > >
> > > On some architectures like x86, under certain conditions, the OPTPROBES
> > > feature enables replacing the probed instruction with a jump instead,
> > > resulting in a significant perfomance boost (one single-step exception
> > > is bypassed for each kprobe).
> >
> > The OPTPROBE is not only for bypassing the single-step exception, but also
> > the breakpoint exception.
> > Please see commit 0dc016dbd820260b (ARM: kprobes: enable OPTPROBES for ARM 32) too,
> > which shows how it is done on RISC processor.
> >
> > > Powerpc has an in-kernel instruction emulator. Kprobes on powerpc uses
> > > this emulator already and bypasses the single-step exception, with a
> > > lot less complexity.
> >
> > So, this might miss the point. Since it is impossible to do on some RISC
> > processor, I agree with this change, but it should be committed with
> > correct comments.
>
> I don't think it's impossible on powerpc.
>
> So we should leave it as a TODO for now.
OK. I put it on my TODO list.
Ananth
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] kprobes: Mark OPTPROBES n/a for powerpc
2015-07-21 4:34 ` Ananth N Mavinakayanahalli
@ 2015-07-21 10:26 ` Masami Hiramatsu
0 siblings, 0 replies; 6+ messages in thread
From: Masami Hiramatsu @ 2015-07-21 10:26 UTC (permalink / raw)
To: ananth, Michael Ellerman; +Cc: linuxppc-dev
On 2015/07/21 13:34, Ananth N Mavinakayanahalli wrote:
> On Tue, Jul 21, 2015 at 12:53:07PM +1000, Michael Ellerman wrote:
>> On Sun, 2015-07-19 at 11:21 +0900, Masami Hiramatsu wrote:
>>> On 2015/07/16 19:56, Ananth N Mavinakayanahalli wrote:
>>>> Kprobes uses a breakpoint instruction to trap into execution flow
>>>> and the probed instruction is single-stepped from an alternate location.
>>>>
>>>> On some architectures like x86, under certain conditions, the OPTPROBES
>>>> feature enables replacing the probed instruction with a jump instead,
>>>> resulting in a significant perfomance boost (one single-step exception
>>>> is bypassed for each kprobe).
>>>
>>> The OPTPROBE is not only for bypassing the single-step exception, but also
>>> the breakpoint exception.
>>> Please see commit 0dc016dbd820260b (ARM: kprobes: enable OPTPROBES for ARM 32) too,
>>> which shows how it is done on RISC processor.
>>>
>>>> Powerpc has an in-kernel instruction emulator. Kprobes on powerpc uses
>>>> this emulator already and bypasses the single-step exception, with a
>>>> lot less complexity.
>>>
>>> So, this might miss the point. Since it is impossible to do on some RISC
>>> processor, I agree with this change, but it should be committed with
>>> correct comments.
>>
>> I don't think it's impossible on powerpc.
>>
>> So we should leave it as a TODO for now.
>
> OK. I put it on my TODO list.
I see, thanks Ananth! :)
--
Masami HIRAMATSU
Linux Technology Research Center, System Productivity Research Dept.
Center for Technology Innovation - Systems Engineering
Hitachi, Ltd., Research & Development Group
E-mail: masami.hiramatsu.pt@hitachi.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-07-21 10:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-16 10:56 [PATCH] kprobes: Mark OPTPROBES n/a for powerpc Ananth N Mavinakayanahalli
2015-07-19 2:21 ` Masami Hiramatsu
2015-07-20 10:38 ` Ananth N Mavinakayanahalli
2015-07-21 2:53 ` Michael Ellerman
2015-07-21 4:34 ` Ananth N Mavinakayanahalli
2015-07-21 10:26 ` Masami Hiramatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).