Re: [PATCH] sched: smpnice try to wakeup modification

From: Tim Chen
Date: Wed Mar 29 2006 - 18:38:43 EST


Peter Williams wrote:
Tim Chen wrote:
Peter,

If there is no load on this_cpu, (i.e. tl_per_task is 0), we will fail the "tl + target_load(cpu, idx) <= tl_per_task" check.

This isn't the case. If this_cpu is idle tl_per_task will be set to SCHED_LOAD_SCALE (see implementation of cpu_avg_load_per_task()) and that expression should succeed unless the value returned by target_load(cpu, idx) is bigger than SCHED_LOAD_SCALE. This is exactly the same as would have happened with the original code.

(BTW cpu_avg_load_per_task()'s original implementation would have had the effect you describe but it was modified when it was realized that it would break the code in a lot of places (not just here). The thinking now is that if there isn't enough data available to calculate the average load per task for a run queue then the correct value to use is the theoretical average i.e. SCHED_LOAD_SCALE.)

Ah, I was looking at the original smpnice patch. Thanks for clarifying.

Tim

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