Re: [PATCH 4/4] sched: bias to target cpu load to reduce task moving

From: Alex Shi
Date: Thu Dec 19 2013 - 08:34:30 EST


On 12/17/2013 11:38 PM, Peter Zijlstra wrote:
> On Tue, Dec 17, 2013 at 02:10:12PM +0000, Morten Rasmussen wrote:
>>> @@ -4135,7 +4141,7 @@ find_idlest_group(struct sched_domain *sd, struct task_struct *p, int this_cpu)
>>> if (local_group)
>>> load = source_load(i);
>>> else
>>> - load = target_load(i);
>>> + load = target_load(i, sd->imbalance_pct);
>>
>> Don't you apply imbalance_pct twice here? Later on in
>> find_idlest_group() you have:
>>
>> if (!idlest || 100*this_load < imbalance*min_load)
>> return NULL;
>>
>> where min_load comes from target_load().
>
> Yes! exactly! this doesn't make any sense.

Thanks a lot for review and comments!

I changed the patch to following shape. and push it under Fengguang's testing
system monitor. Any testing are appreciated!

BTW, Seems lots of changes in scheduler come from kinds of scenarios/benchmarks
experience. But I still like to take any theoretical comments/suggestions.

--
Thanks
Alex

===