Loading kernel/sched/fair.c +19 −0 Original line number Diff line number Diff line Loading @@ -10566,6 +10566,7 @@ static inline unsigned long get_sd_balance_interval(struct sched_domain *sd, int cpu_busy) { unsigned long interval = sd->balance_interval; unsigned int cpu; if (cpu_busy) interval *= sd->busy_factor; Loading @@ -10574,6 +10575,24 @@ get_sd_balance_interval(struct sched_domain *sd, int cpu_busy) interval = msecs_to_jiffies(interval); interval = clamp(interval, 1UL, max_load_balance_interval); /* * check if sched domain is marked as overutilized * we ought to only do this on systems which have SD_ASYMCAPACITY * but we want to do it for all sched domains in those systems * So for now, just check if overutilized as a proxy. */ /* * If we are overutilized and we have a misfit task, then * we want to balance as soon as practically possible, so * we return an interval of zero, except for busy balance. */ if (sd_overutilized(sd) && !cpu_busy) { /* we know the root is overutilized, let's check for a misfit task */ for_each_cpu(cpu, sched_domain_span(sd)) { if (cpu_rq(cpu)->misfit_task_load) return 1; } } return interval; } Loading Loading
kernel/sched/fair.c +19 −0 Original line number Diff line number Diff line Loading @@ -10566,6 +10566,7 @@ static inline unsigned long get_sd_balance_interval(struct sched_domain *sd, int cpu_busy) { unsigned long interval = sd->balance_interval; unsigned int cpu; if (cpu_busy) interval *= sd->busy_factor; Loading @@ -10574,6 +10575,24 @@ get_sd_balance_interval(struct sched_domain *sd, int cpu_busy) interval = msecs_to_jiffies(interval); interval = clamp(interval, 1UL, max_load_balance_interval); /* * check if sched domain is marked as overutilized * we ought to only do this on systems which have SD_ASYMCAPACITY * but we want to do it for all sched domains in those systems * So for now, just check if overutilized as a proxy. */ /* * If we are overutilized and we have a misfit task, then * we want to balance as soon as practically possible, so * we return an interval of zero, except for busy balance. */ if (sd_overutilized(sd) && !cpu_busy) { /* we know the root is overutilized, let's check for a misfit task */ for_each_cpu(cpu, sched_domain_span(sd)) { if (cpu_rq(cpu)->misfit_task_load) return 1; } } return interval; } Loading