Re: fair clock use in CFS
From: Srivatsa Vaddagiri
Date: Mon May 14 2007 - 10:54:48 EST
On Mon, May 14, 2007 at 10:31:13AM -0400, Daniel Hazelton wrote:
> Hrm... Okay, so you're saying that "fair_clock" runs slower the more process
> there are running to keep the above run-up in "Time Spent on CPU" I noticed
> based solely on your initial example? If that is the case, then I can see the
> fairness - its just not visible from a really quick look at the code and the
> simplified description you gave earlier.
>From the code:
update_curr()
delta_fair = delta_exec * NICE_0_LOAD;
do_div(delta_fair, rq->raw_weighted_load);
..
rq->fair_clock += delta_fair;
Although wall clock would have advanced by delta_exec, fair clock
advances only by delta_fair.
More the load on the CPU (rq->raw_weighted_load), slower is this advance
compared to wall clock.
--
Regards,
vatsa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/