There's two topics in this thread.
1) the x86 issue of the 5 byte instruction. The problem with x86 is that on
some CPUs the nop used consists of two nops to fill the 5 bytes. There is
no way to change that atomically. The workarounds for this is the arch
specific ftrace_pre_enable() that will make sure no process is about to
execute the second part of that nop.
2) Getting rid of the daemon. The daemon is used to patch the code
dynamically later on bootup. Now an arch may or may not be able to modify
code in SMP, but I've been told that this is dangerous to do even on PPC.
Dynamically modifying text that might be in the pipeline on another CPU
may or may not be dangerous on all archs.
The fix here is to convert the mcount calls to nops at boot up. This is
really ideal on all archs. This means we know ever mcount call, and we get
rid of the requirement that we need to run the code once before we can
trace it.
The kstop_machine is now only left at the start and stop of tracing.
-- Steve
--