Hi Ingo,
while debugging the IA64 race-conditions with the new scheduler some
question/suggestion came to my mind.
In the load_balance() function the initial value for max_load should
better be set to 1 instead of 0 in order to avoid finding 'busiest'
runqueues with only one task. This avoids taking the spin-locks
unnecessarily for the case idle=1.
Another issue: I don't understand how prev_max_load works, I think that
the comments in load_balance are not true any more and the comparison to
prev_max_load can be dropped. In the loop where you compare wit hit it
will never have another value than 1000000000. Or am I completely
misunderstanding the code?
Thanks,
best regards,
Erich
On Sat, 19 Jan 2002, Erich Focht wrote:
> In the load_balance() function the initial value for max_load should
> better be set to 1 instead of 0 in order to avoid finding 'busiest'
> runqueues with only one task. This avoids taking the spin-locks
> unnecessarily for the case idle=1.
agreed.
> Another issue: I don't understand how prev_max_load works, I think
> that the comments in load_balance are not true any more and the
> comparison to prev_max_load can be dropped. [...]
you are right, and this changed recently. Since we do not search for
multiple queues anymore when balancing, this variable can be dropped.
I've added both of your suggestions to my tree.
Ingo