Re: [PATCH]kernel/sched_fair.c: the comment of thecalc_delta_fair() maybe not correctly

From: Peter Zijlstra
Date: Wed Apr 08 2009 - 05:52:21 EST


On Wed, 2009-04-08 at 10:27 +0800, figo.zhang wrote:
> the comment of the calc_delta_fair() maybe not correctly, should be
> delta *= NICE_0_LOAD/se->load
>
> Signed-off-by: figo.zhang <figo.zhang@xxxxxxxxxxxxx>
>
> diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
> index 3816f21..5134b45 100644
> --- a/kernel/sched_fair.c
> +++ b/kernel/sched_fair.c
> @@ -386,7 +386,7 @@ int sched_nr_latency_handler(struct ctl_table
> *table, int write, #endif
>
> /*
> - * delta /= w
> + * delta *= NICE_0_LOAD/se->load
> */
> static inline unsigned long
> calc_delta_fair(unsigned long delta, struct sched_entity *se)

The comment is conceptually correct.

NICE_0_LOAD := 1 and se->load := w, ergo, delta /= w.


--
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/