[lkml]   [2012]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC][PATCH] tracepoints: Move the work out of line from hotpath sections
    On Thu, 2012-08-09 at 16:50 -0400, Mathieu Desnoyers wrote:

    > I guess the very first thing to do would be to benchmark this patch
    > thoroughly to see if it brings significant performance improvements to
    > the "tracing built-in, not enabled" case. If it does bring a significant
    > improvement, then we can consider the overhead on tracing, and see if it
    > makes sense to add this extra indirection on the tracing hot path.

    I know you and your customers focus a lot on tracing. But if there is a
    decent improvement with the 'off' case, then I think that's rational
    enough for such a change. Remember, tracing is always a second class
    citizen to kernel performance.

    But I agree that this change is probably not worth it if it's just a
    slight performance.

    > About your "Pro" point "Less code in the hot paths", it remains to be
    > seen, overall, how many bytes of the removed instructions actually sit
    > on hot cache lines and if there is any effect on the TLB, especially
    > given that this "maybe-not-so-hot" code is in an unlikely branch.

    This is why I posted the patch now. I don't have any real good
    measurements for performance testing. It showed some improvement with
    hackbench, but hackbench is very unreliable for such tests. I'm hoping
    others will run it under their work loads to see how things improve.

    > It might be better to improve gcc to move really cold branches out of
    > line (really, really far away), and use the compiler to do this, rather
    > than to use an extra indirection that adds bloat and complexity to the
    > kernel.

    I think modifying gcc is something that can help more than tracing. But
    that's been a pipe dream for such a long time that I've started dreaming
    about winning a gold medal in the Olympics instead. Standing on the
    podium listening to the crowd chanting your name along with your country
    is more fun to dream about than seeing your unlikely code stop becoming
    hurdles for the CPU sprinters.

    Yes, I had a bit of Olympic overdose lately.

    -- Steve

     \ /
      Last update: 2012-08-10 02:21    [W:0.022 / U:7.096 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site