lkml.org 
[lkml]   [2007]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [patch] CFS scheduler, -v14
    Ingo Molnar wrote:
    > * Li Yu <raise.sail@gmail.com> wrote:
    >
    >
    >> static void distribute_fair_add(struct rq *rq, s64 delta)
    >> {
    >> struct task_struct *curr = rq->curr;
    >> s64 delta_fair = 0;
    >>
    >> if (!(sysctl_sched_load_smoothing & 32))
    >> return;
    >>
    >> if (rq->nr_running) {
    >> delta_fair = div64_s(delta, rq->nr_running);
    >> /*
    >> * The currently running task's next wait_runtime value does
    >> * not depend on the fair_clock, so fix it up explicitly:
    >> */
    >> add_wait_runtime(rq, curr, -delta_fair);
    >> rq->fair_clock -= delta_fair;
    >> }
    >> }
    >>
    >> See this line:
    >>
    >> delta_fair = div64_s(delta, rq->nr_running);
    >>
    >> Ingo, should we be replace "rq->nr_running" with "rq->raw_load_weight"
    >> here?
    >>
    >
    > that would break the code. The handling of sleep periods is basically
    > heuristics and using nr_running here appears to be 'good enough' in
    > practice.
    >
    >
    Thanks, I am wrong at seeing the delta variable is represented by
    virtual time unit. if the code does as I said, the delta_fair may be too
    small to meanless.

    Also, I have want to know what's real meaning of

    add_wait_runtime(rq, curr, delta_mine - delta_exec);

    in update_curr(), IMHO, it should be

    add_wait_runtime(rq, curr, delta_mine - delta_fair);

    Is this just another heuristics? or my opinion is wrong again? :-)

    Good luck.

    - Li Yu





    -
    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-01 09:19    [W:2.408 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site