Re: ftrace_enabled set to 1 on bootup, slow downs withCONFIG_FUNCTION_TRACER in virt environments?

From: Steven Rostedt
Date: Tue Feb 21 2012 - 10:55:12 EST


On Tue, 2012-02-21 at 10:38 -0500, Konrad Rzeszutek Wilk wrote:
>
> > You mean that we get a lot more functions because the compiler made them
> > functions? Maybe we should add "notrace" to all paravirt functions? Then
> > they wont have the calls or nops.
>
> <nods> Do you remember the rational of why some have notrace but not all?

They probably all should. Unless there's some reason people want to
trace those functions. But if they are not traced on bare-metal, then it
probably isn't worth tracing them on paravirt either.

>
> >
> > > - Somehow the low-level para-virt (like the assembler ones) calls don't get
> > > patched over and still end up calling mcount? (but I really doubt that is the
> > > case - but you never know).
> >
> > We only live patch code in a white list of sections. But with the latest
> > scripts/recordmcount.c, as I stated above, the ones that don't get
> > patched at boot up, should be patched at compile time. But that still
> > keeps the nops there.
>
> So the ideal_nop in the looks to be different from what the trace code
> decides to patch during execution. Is that OK? I am not that familiar with the
> variants of nops to know if some are just not ok on certain architectures?

What gets patched at compile time isn't the ideal for the arch. But it's
the "best" that can be done at that moment. But pretty much all of the
non ideal nops are patched over .init sections that are called only once
(at boot up). Even though they may not be the ideal nop for the running
box, it shouldn't be any noticeable overhead.

-- Steve


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