From: Li Yu <raise.sail@gmail.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] CFS scheduler, -v14
Date: Fri, 01 Jun 2007 15:16:55 +0800 [thread overview]
Message-ID: <465FC7E7.7080804@gmail.com> (raw)
In-Reply-To: <20070531095337.GA8104@elte.hu>
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
next prev parent reply other threads:[~2007-06-01 7:17 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-23 12:06 [patch] CFS scheduler, -v14 Ingo Molnar
2007-05-23 19:39 ` Nicolas Mailhot
2007-05-23 19:57 ` Ingo Molnar
2007-05-23 20:02 ` Nicolas Mailhot
2007-05-24 6:42 ` Balbir Singh
2007-05-24 8:09 ` Ingo Molnar
2007-05-24 9:19 ` Balbir Singh
2007-05-24 17:25 ` Jeremy Fitzhardinge
2007-05-24 20:59 ` Ingo Molnar
2007-05-24 22:43 ` Jeremy Fitzhardinge
2007-05-25 12:46 ` Ingo Molnar
2007-05-25 16:45 ` Balbir Singh
2007-05-28 11:07 ` Ingo Molnar
2007-05-29 10:23 ` Balbir Singh
2007-06-05 7:57 ` Ingo Molnar
2007-05-29 10:19 ` Balbir Singh
2007-05-26 14:58 ` S.Çağlar Onur
2007-05-26 15:08 ` S.Çağlar Onur
2007-06-01 13:35 ` S.Çağlar Onur
2007-06-01 15:31 ` Linus Torvalds
2007-06-07 22:29 ` S.Çağlar Onur
2007-06-01 15:37 ` [OT] " Andreas Mohr
2007-05-27 2:49 ` Li Yu
2007-05-29 6:15 ` Ingo Molnar
2007-05-29 8:07 ` Ingo Molnar
2007-05-31 9:45 ` Li Yu
2007-05-31 9:53 ` Ingo Molnar
2007-06-01 7:16 ` Li Yu [this message]
2007-06-01 19:21 ` Ingo Molnar
2007-06-05 2:33 ` Li Yu
2007-06-05 8:01 ` Ingo Molnar
2007-06-05 8:54 ` Li Yu
2007-06-06 7:41 ` Li Yu
2007-06-05 3:35 ` Li Yu
2007-05-28 1:17 ` Li Yu
2007-05-29 0:49 ` Li Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=465FC7E7.7080804@gmail.com \
--to=raise.sail@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox