On Mon, Dec 12, 2016 at 05:00:10PM +0100, Vincent Guittot wrote:
On 9 December 2016 at 18:06, Morten Rasmussen morten.rasmussen@arm.com wrote:
On Thu, Dec 08, 2016 at 11:42:50AM -0500, Thara Gopinath wrote:
On 12/08/2016 05:24 AM, Leo Yan wrote:
On Wed, Dec 07, 2016 at 05:22:37PM -0500, Thara Gopinath wrote:
- /* If the domain util is greater that domain capacity, load balancing
- needs to be done at the next sched domain level as well
- */
- if (sds->total_capacity * 1024 < sds->total_util * capacity_margin) {
/* If already at the highest domain nothing can be done */
if (env->sd->parent)
set_sd_overutilized(env->sd->parent,
env->dst_rq->rd);
So usually this will set root domain's flag after the whole schedule domain util greater than domain capacity. If CPU has one "misfit" task then scheduler will not reach this condition, so this will not set root domain's flag and introduce delay to migrate task.
Hmm yes. you are correct. we may have to handle misfit tasks separately.
I don't quite understand why we have to set the flag on the parent sched_domain here. It should be set anyways when update_sd_lb_stats() is
But the load balance will not be triggered if the flag is not set and update_sd_lb_stats will not be called. So once we have updated the statistics of the current domain and we consider that this domain is overutilized, we set the overutilized flag to the parent so the load balance will happen at the next level involving more cpus
Okay. IIUC, we one criteria for setting the flag at the current level, and another one for setting it at the next level to 'call for help'.
To me it seems that we have distinct scenarios that possibly require a flag each: One to tell that we need to balance within the domain, we are sure that we can fix things locally, and another one tell we need help from a another domain, i.e. we need to balance at the parent domain level.
called for the parent sched_domain in the next iteration of for_each_domain() in rebalance_domains(). But I see that we bails out early there, which I don't quite understand either. More on that in a separate reply ;-)
I agree with Leo that total_util doesn't flag some quite important cases as overutilized.
yes the case of a single task that requires more capacity that the max capacity_orig of cpus in the domain is not tested
Okay. I think we need to think that in otherwise the solution won't work for asymmetric cpu capacity systems.
Thanks, Morten IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.