lkml.org 
[lkml]   [2007]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [patch] CFS scheduler, -v17

    * Miguel Botón <mboton@gmail.com> wrote:

    > I patched kernel 2.6.21.5 with CFS v17 and I didn't experience this
    > problem (I checked that piece of code and I didn't see something
    > wrong). Looks like it only appears in kernel 2.6.22-rc4.

    yeah - it affected the .22 patches, the .21 and .20 patches compiled and
    worked under !CONFIG_SMP too. I updated the .22 patches with the fix
    below.

    Ingo

    -------------->
    Index: linux-cfs-2.6.22-rc4.q/kernel/sched.c
    ===================================================================
    --- linux-cfs-2.6.22-rc4.q.orig/kernel/sched.c
    +++ linux-cfs-2.6.22-rc4.q/kernel/sched.c
    @@ -248,6 +249,15 @@ static unsigned int static_prio_timeslic
    return SCALE_PRIO(DEF_TIMESLICE, static_prio);
    }

    +static inline int cpu_of(struct rq *rq)
    +{
    +#ifdef CONFIG_SMP
    + return rq->cpu;
    +#else
    + return 0;
    +#endif
    +}
    +
    #ifdef CONFIG_SMP
    /*
    * Divide a load by a sched group cpu_power : (load / sg->__cpu_power)
    @@ -258,15 +268,6 @@ static inline u32 sg_div_cpu_power(const
    return reciprocal_divide(load, sg->reciprocal_cpu_power);
    }

    -static inline int cpu_of(struct rq *rq)
    -{
    -#ifdef CONFIG_SMP
    - return rq->cpu;
    -#else
    - return 0;
    -#endif
    -}
    -
    /*
    * Each time a sched group cpu_power is changed,
    * we must compute its reciprocal value
    -
    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: 2007-06-15 21:37    [W:0.024 / U:118.284 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site