Re: [PATCH 0/3] ring-buffer: less locking and only disablepreemption

From: Ingo Molnar
Date: Sat Oct 04 2008 - 10:45:14 EST



* Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> The dynamic function tracer is another issue. The problem with NMIs
> has nothing to do with locking, or corrupting the buffers. It has to
> do with the dynamic code modification. Whenever we modify code, we
> must guarantee that it will not be executed on another CPU.
>
> Kstop_machine serves this purpose rather well. We can modify code
> without worrying it will be executed on another CPU, except for NMIs.
> The problem now comes where an NMI can come in and execute the code
> being modified. That's why I put in all the notrace, lines. But it
> gets difficult because of nmi_notifier can call all over the kernel.
> Perhaps, we can simply disable the nmi-notifier when we are doing the
> kstop_machine call?

that would definitely be one way to reduce the cross section, but not
enough i'm afraid. For example in the nmi_watchdog=2 case we call into
various lapic functions and paravirt lapic handlers which makes it all
spread to 3-4 paravirtualization flavors ...

sched_clock()'s notrace aspects were pretty manageable, but this in its
current form is not.

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/