Re: [tg_shares_up rewrite v3 09/11] sched: demand basedupdate_cfs_load()

From: Peter Zijlstra
Date: Fri Nov 12 2010 - 05:53:53 EST


On Thu, 2010-11-11 at 19:24 -0800, Paul Turner wrote:
> +#ifdef CONFIG_FAIR_GROUP_SCHED
> + cfs_rq->load_unacc_exec_time += delta_exec;
> + if (cfs_rq->load_unacc_exec_time > sysctl_sched_shares_window)
> {
> + update_cfs_load(cfs_rq);
> + update_cfs_shares(cfs_rq, 0);

Why not:
+ cfs_rq->load_unacc_exec_time -= sysctl_sched_shares_window;

(although you probably want to read the sysctl value into a local
variable using ACCESS_ONCE() and use that for both cases).

> + }
> +#endif
> }
>
> static void update_curr(struct cfs_rq *cfs_rq)
> @@ -713,6 +724,7 @@ static void update_cfs_load(struct cfs_r
> }
>
> cfs_rq->load_stamp = now;
> + cfs_rq->load_unacc_exec_time = 0;

and drop this one?
--
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/