Re: [PATCH v2 0/4] Static calls

From: Josh Poimboeuf
Date: Mon Nov 26 2018 - 17:24:28 EST


On Mon, Nov 26, 2018 at 03:54:05PM -0500, Steven Rostedt wrote:
> In summary, we had this:
>
> No RETPOLINES:
> 1.4503 +- 0.0148 seconds time elapsed ( +- 1.02% )
>
> baseline RETPOLINES:
> 1.5120 +- 0.0133 seconds time elapsed ( +- 0.88% )
>
> Added direct calls for trace_events:
> 1.5239 +- 0.0139 seconds time elapsed ( +- 0.91% )
>
> With static calls:
> 1.5282 +- 0.0135 seconds time elapsed ( +- 0.88% )
>
> With static call trampolines:
> 1.48328 +- 0.00515 seconds time elapsed ( +- 0.35% )
>
> Full static calls:
> 1.47364 +- 0.00706 seconds time elapsed ( +- 0.48% )
>
>
> Adding Retpolines caused a 1.5120 / 1.4503 = 1.0425 ( 4.25% ) slowdown
>
> Trampolines made it into 1.48328 / 1.4503 = 1.0227 ( 2.27% ) slowdown
>
> With full static calls 1.47364 / 1.4503 = 1.0160 ( 1.6% ) slowdown
>
> Going from 4.25 to 1.6 isn't bad, and I think this is very much worth
> the effort. I did not expect it to go to 0% as there's a lot of other
> places that retpolines cause issues, but this shows that it does help
> the tracing code.
>
> I originally did the tests with the development config, which has a
> bunch of debugging options enabled (hackbench usually takes over 9
> seconds, not the 1.5 that was done here), and the slowdown was closer
> to 9% with retpolines. If people want me to do this with that, or I can
> send them the config. Or better yet, the code is here, just use your
> own configs.

Thanks a lot for running these. This looks like a nice speedup. Also a
nice reduction in the standard deviation.

Should I add your tracepoint patch to the next version of my patches?

--
Josh