Re: sched_steal_proc(): steal from highest loaded CPU

2020-02-05 Thread Amit Kulkarni
> > 'ci' changes after we proceed to another cpu, and cost will be different > > for each cpu+proc combination. > > Look at at line 516 of kern/kern_sched.c doest the first argument of > sched_proc_to_cpu_cost() change? Aaaargh, you are absolutely right! My fault, I was blinded by looking at

Re: sched_steal_proc(): steal from highest loaded CPU

2020-02-05 Thread Martin Pieuchot
On 04/02/20(Tue) 13:13, Amit Kulkarni wrote: > [...] > 'ci' changes after we proceed to another cpu, and cost will be different for > each cpu+proc combination. Look at at line 516 of kern/kern_sched.c doest the first argument of sched_proc_to_cpu_cost() change? > Actually, in the steal case,

Re: sched_steal_proc(): steal from highest loaded CPU

2020-02-04 Thread Amit Kulkarni
> > When a cpu is idle, and wants to steal, it should steal from worst loaded > > cpu, i.e. with the highest cost, not the least cost. > > What you say might be a valid choice. However I'm not sure to > understand how does it relate to the behavior of the code? > > When stealing

Re: sched_steal_proc(): steal from highest loaded CPU

2020-02-04 Thread Martin Pieuchot
On 04/02/20(Tue) 08:43, Amit Kulkarni wrote: > When a cpu is idle, and wants to steal, it should steal from worst loaded > cpu, i.e. with the highest cost, not the least cost. What you say might be a valid choice. However I'm not sure to understand how does it relate to the behavior of the

sched_steal_proc(): steal from highest loaded CPU

2020-02-04 Thread Amit Kulkarni
Hi, When a cpu is idle, and wants to steal, it should steal from worst loaded cpu, i.e. with the highest cost, not the least cost. Also, remove a dead store while here. Thanks Index: kern/kern_sched.c === RCS file: