Re: [PATCH -tip v4 3/3] kprobes: Support delayed unoptimization

From: Masami Hiramatsu
Date: Fri Nov 26 2010 - 04:27:58 EST


(2010/11/26 16:26), Ingo Molnar wrote:
> * Masami Hiramatsu <masami.hiramatsu.pt@xxxxxxxxxxx> wrote:
>
>> Unoptimization occurs when a probe is unregistered or disabled, and
>> is heavy because it recovers instructions by using stop_machine().
>> This patch delays unoptimization operations and unoptimize several
>> probes at once by using text_poke_smp_batch().
>> This can avoid unexpected system slowdown coming from stop_machine().
>>
>> Changes in v2:
>> - Use dynamic allocated buffers and params.
>>
>> Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
>> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
>> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
>> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx>
>> Cc: x86@xxxxxxxxxx
>> Cc: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>
>> Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
>> Cc: Ananth N Mavinakayanahalli <ananth@xxxxxxxxxx>
>> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>
>> Cc: linux-kernel@xxxxxxxxxxxxxxx
>> Cc: Rusty Russell <rusty@xxxxxxxxxxxxxxx>
>> Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
>> ---
>>
>> arch/x86/include/asm/kprobes.h | 4
>> arch/x86/kernel/kprobes.c | 45 ++++
>> include/linux/kprobes.h | 2
>> kernel/kprobes.c | 434 +++++++++++++++++++++++++++-------------
>> 4 files changed, 344 insertions(+), 141 deletions(-)
>
> Hm, this is a scary big patch with non-trivial effects - it should be broken up as
> much as possible, into successive, bisectable steps. The end result looks mostly
> fine - it's just this one huge step of a patch that is dangerous.

Agreed, then I'll break it down to several patches.
Thank you for your comment! :)

>
> Thanks,
>
> Ingo


--
Masami HIRAMATSU
2nd Dept. Linux Technology Center
Hitachi, Ltd., Systems Development Laboratory
E-mail: masami.hiramatsu.pt@xxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/