lkml.org 
[lkml]   [2006]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    SubjectRE: [PATCH RFC] smt nice introduces significant lock contention
    Date
    Nick Piggin wrote on Friday, June 02, 2006 12:53 AM
    > Con Kolivas wrote:
    >
    > >>Nice to acknowledge Chris's idea for
    > >>trylocks in your changelog when you submit a final patch.
    > >
    > >
    > > I absolutely would and I would ask for him to sign off on it as well, once we
    > > agreed on a final form.
    >
    > This is a small micro-optimisation / cleanup we can do after
    > smtnice gets converted to use trylocks. Might result in a little
    > less cacheline footprint in some cases.


    Just to pile up more micro-optimization: kernel can break out of the
    for_each_domain loop when it hits first SD_SHARE_CPUPOWER.

    - Ken


    Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>


    --- ./kernel/sched.c.orig 2006-06-01 23:14:47.000000000 -0700
    +++ ./kernel/sched.c 2006-06-01 23:18:07.000000000 -0700
    @@ -2780,8 +2780,10 @@ static int dependent_sleeper(int this_cp
    int ret = 0, i;

    for_each_domain(this_cpu, tmp)
    - if (tmp->flags & SD_SHARE_CPUPOWER)
    + if (tmp->flags & SD_SHARE_CPUPOWER) {
    sd = tmp;
    + break;
    + }

    if (!sd)
    return 0;
    -
    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: 2006-06-02 10:41    [from the cache]
    ©2003-2014 Jasper Spaans. hosted at Digital Ocean