Lines Matching defs:busiest

9273  * first so the group_type can simply be compared when selecting the busiest
10056 struct sched_group *busiest; /* Busiest group in this sd */
10063 struct sg_lb_stats busiest_stat; /* Statistics of the busiest group */
10073 * busiest_stat::idle_cpus to the worst busiest group because
10077 .busiest = NULL,
10223 * When this is so detected; this group becomes a candidate for busiest; see
10353 * @sgs: Load-balancing statistics of the candidate busiest group
10354 * @group: The candidate busiest group
10408 struct sg_lb_stats *busiest,
10414 if (!env->idle || !busiest->sum_nr_running)
10417 ncores_busiest = sds->busiest->cores;
10421 imbalance = busiest->sum_nr_running;
10427 imbalance = ncores_local * busiest->sum_nr_running;
10435 busiest->sum_nr_running > 1)
10550 * update_sd_pick_busiest - return 1 on busiest group
10553 * @sg: sched_group candidate to be checked for being the busiest
10557 * busiest group.
10560 * busiest group. %false otherwise.
10567 struct sg_lb_stats *busiest = &sds->busiest_stat;
10585 if (sgs->group_type > busiest->group_type)
10588 if (sgs->group_type < busiest->group_type)
10592 * The candidate and the current busiest group are the same type of
10593 * group. Let check which one is the busiest according to the type.
10599 return sgs->avg_load > busiest->avg_load;
10610 return sched_asym_prefer(READ_ONCE(sds->busiest->asym_prefer_cpu),
10618 return sgs->group_misfit_task_load > busiest->group_misfit_task_load;
10625 if (sgs->idle_cpus != 0 || busiest->idle_cpus != 0)
10643 if (sgs->avg_load < busiest->avg_load)
10646 if (sgs->avg_load == busiest->avg_load) {
10651 if (sds->busiest->flags & SD_SHARE_CPUCAPACITY)
10663 if (smt_vs_nonsmt_groups(sds->busiest, sg)) {
10678 if (sgs->idle_cpus > busiest->idle_cpus)
10680 else if ((sgs->idle_cpus == busiest->idle_cpus) &&
10681 (sgs->sum_nr_running <= busiest->sum_nr_running))
11164 sds->busiest = sg;
11177 * Indicate that the child domain of the busiest group prefers tasks
11181 if (sds->busiest)
11182 sds->prefer_sibling = !!(sds->busiest->flags & SD_PREFER_SIBLING);
11209 struct sg_lb_stats *local, *busiest;
11212 busiest = &sds->busiest_stat;
11214 if (busiest->group_type == group_misfit_task) {
11225 env->imbalance = busiest->group_misfit_task_load;
11230 if (busiest->group_type == group_asym_packing) {
11236 env->imbalance = busiest->sum_h_nr_running;
11240 if (busiest->group_type == group_smt_balance) {
11247 if (busiest->group_type == group_imbalanced) {
11261 * emptying busiest.
11264 if ((busiest->group_type > group_fully_busy) &&
11267 * If busiest is overloaded, try to fill spare
11269 * in busiest or busiest still being overloaded but
11282 * waiting task in this overloaded busiest group. Let's
11293 if (busiest->group_weight == 1 || sds->prefer_sibling) {
11299 env->imbalance = sibling_imbalance(env, sds, busiest, local);
11308 (local->idle_cpus - busiest->idle_cpus));
11328 * busiest group
11341 * busiest group don't try to pull any tasks.
11343 if (local->avg_load >= busiest->avg_load) {
11372 (busiest->avg_load - sds->avg_load) * busiest->group_capacity,
11380 * Decision matrix according to the local and busiest group type:
11382 * busiest \ local has_spare fully_busy misfit asym imbalanced overloaded
11400 * sched_balance_find_src_group - Returns the busiest group within the sched_domain
11407 * Return: - The busiest group if imbalance exists.
11411 struct sg_lb_stats *local, *busiest;
11423 if (!sds.busiest)
11426 busiest = &sds.busiest_stat;
11429 if (busiest->group_type == group_misfit_task)
11437 if (busiest->group_type == group_asym_packing)
11441 * If the busiest group is imbalanced the below checks don't
11445 if (busiest->group_type == group_imbalanced)
11450 * If the local group is busier than the selected busiest group
11453 if (local->group_type > busiest->group_type)
11463 * busiest group don't try to pull any tasks.
11465 if (local->avg_load >= busiest->avg_load)
11480 * If the busiest group is more loaded, use imbalance_pct to be
11483 if (100 * busiest->avg_load <=
11489 * Try to move all excess tasks to a sibling domain of the busiest
11493 sibling_imbalance(env, &sds, busiest, local) > 1)
11496 if (busiest->group_type != group_overloaded) {
11499 * If the busiest group is not overloaded (and as a
11506 if (busiest->group_type == group_smt_balance &&
11507 smt_vs_nonsmt_groups(sds.local, sds.busiest)) {
11512 if (busiest->group_weight > 1 &&
11513 local->idle_cpus <= (busiest->idle_cpus + 1)) {
11515 * If the busiest group is not overloaded
11516 * and there is no imbalance between this and busiest
11526 if (busiest->sum_h_nr_running == 1) {
11528 * busiest doesn't have any tasks waiting to run
11537 return env->imbalance ? sds.busiest : NULL;
11545 * sched_balance_find_src_rq - find the busiest runqueue among the CPUs in the group.
11550 struct rq *busiest = NULL, *rq;
11572 * If we ignore the actual busiest queue to migrate another
11573 * task, the next balance pass can still reduce the busiest
11640 busiest = rq;
11657 busiest = rq;
11664 busiest = rq;
11675 busiest = rq;
11683 return busiest;
11872 struct rq *busiest;
11912 busiest = sched_balance_find_src_rq(&env, group);
11913 if (!busiest) {
11918 WARN_ON_ONCE(busiest == env.dst_rq);
11922 env.src_cpu = busiest->cpu;
11923 env.src_rq = busiest;
11928 if (busiest->nr_running > 1) {
11931 * an imbalance but busiest->nr_running <= 1, the group is
11935 env.loop_max = min(sysctl_sched_nr_migrate, busiest->nr_running);
11938 rq_lock_irqsave(busiest, &rf);
11939 update_rq_clock(busiest);
11950 * unlock busiest->lock, and we are able to be sure
11955 rq_unlock(busiest, &rf);
12018 __cpumask_clear_cpu(cpu_of(busiest), cpus);
12022 * active CPUs remaining as possible busiest CPUs to
12054 raw_spin_rq_lock_irqsave(busiest, flags);
12058 * if the curr task on busiest CPU can't be
12061 if (!cpumask_test_cpu(this_cpu, busiest->curr->cpus_ptr)) {
12062 raw_spin_rq_unlock_irqrestore(busiest, flags);
12074 if (!busiest->active_balance) {
12075 busiest->active_balance = 1;
12076 busiest->push_cpu = this_cpu;
12081 raw_spin_rq_unlock_irqrestore(busiest, flags);
12083 stop_one_cpu_nowait(cpu_of(busiest),
12084 active_load_balance_cpu_stop, busiest,
12085 &busiest->active_balance_work);
12191 * running tasks off the busiest CPU onto idle CPUs. It requires at