On 12/16/2016 05:07 AM, Morten Rasmussen wrote:
On Thu, Dec 15, 2016 at 03:51:01PM -0500, Thara Gopinath wrote:
On 12/09/2016 12:42 PM, Morten Rasmussen wrote:
On Wed, Dec 07, 2016 at 05:22:37PM -0500, Thara Gopinath wrote:
@@ -8790,6 +8850,11 @@ static void rebalance_domains(struct rq *rq, enum cpu_idle_type idle)
rcu_read_lock(); for_each_domain(cpu, sd) {
if (energy_aware()) {
if (!is_sd_overutilized(sd, rq->rd))
continue;
}
So here were iterating through the sched_domains from lowest to highest. At each level we check if the domain has already been found determined to be over-utilized. IIUC, this scheme is based on the total_util condition that sets the flag on the parent domain, otherwise we would have to iterate over the sched_groups to see if any of them had their over-utilized flag set. For example, if the little cpus are over-utilized and the big cpus have to discover this fact when they balance across clusters.
That is true. If little cpu's are over-utilized,load-balancing on the big cpu will miss it , in this implementation. I was under the assumption that load balancing on the little cpu correcting the imbalance is sufficient. There can be a time lag. I was more focusing on avoiding the loop in rebalance_domains. So is it not acceptable to wait until the load balance on the little cpu corrects itself out? Pardon me , if my question is too dumb as I am new to this.
Please keep asking questions :-) They are all very valid.
IMHO, it is fine to wait for the little cpus to sort out the over-utilization amongst themselves if we are sure that they are indeed able to do so. In that case I agree with you. However, if they can't sort it out, like in the 'misfit' task case, we need to involve the big cpus.
I think the whole thing will become a bit more clear if we can sort out a proposal for how to deal with asymmetric cpu capacities (big.LITTLE). I think you need to introduce additional criteria for setting the flag for those systems, but you may be able to make criteria depend on the SD_ASYM_CPUCAPACITY so SMP can avoid them.
I will try to incorporate a check for misfit tasks in my next version. I will keep this check for time being as is.
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.
-- Regards Thara