lkml.org 
[lkml]   [2009]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [RFC][PATCH] Introduce CLOCK_REALTIME_COARSE
    On Fri, Jul 17, 2009 at 7:39 PM, john stultz<johnstul@us.ibm.com> wrote:
    > -       if (likely(gtod->sysctl_enabled && gtod->clock.vread))
    > +       if (likely(gtod->sysctl_enabled))

    This irks me. If the sysctl is enabled and the codepath is getting
    used often enough that we care about performance, branch prediction
    should do the right thing without compiler hints. On the other hand,
    if the sysctl is disabled, and the compiler is telling the cpu to
    ignore its branch predictor, it'll hurt. I don't think we should be
    wrapping (un)likely annotations around configuration options, unless
    we're biasing against debug conditions where we definitely don't care
    about performance. The patch is certainly no worse than the existing
    code, but while we have the hood up, it might be nice to remove the
    annotation, unless we're sure that it does no harm, and does some
    good.

    -- Chris
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2009-07-19 05:11    [W:0.021 / U:59.384 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site