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

From: Ingo Molnar
Date: Fri Nov 26 2010 - 02:27:06 EST



* 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.

Thanks,

Ingo
--
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/