Lines Matching defs:sds
8804 struct sched_domain_shared *sds;
8806 sds = rcu_dereference_all(per_cpu(sd_balance_shared, cpu));
8807 if (sds)
8808 WRITE_ONCE(sds->has_idle_cores, val);
8813 struct sched_domain_shared *sds;
8815 sds = rcu_dereference_all(per_cpu(sd_balance_shared, cpu));
8816 if (sds)
8817 return READ_ONCE(sds->has_idle_cores);
11705 static inline void init_sd_lb_stats(struct sd_lb_stats *sds)
11714 *sds = (struct sd_lb_stats){
12055 struct sd_lb_stats *sds,
12065 ncores_busiest = sds->busiest->cores;
12066 ncores_local = sds->local->cores;
12213 * @sds: Load-balancing data with statistics of the local group.
12219 struct sd_lb_stats *sds,
12229 local_group = group == sds->local;
12342 * @sds: sched_domain statistics
12353 struct sd_lb_stats *sds,
12357 struct sg_lb_stats *busiest = &sds->busiest_stat;
12378 sds->local_stat.group_type != group_has_spare))
12421 return sched_asym_prefer(READ_ONCE(sds->busiest->asym_prefer_cpu),
12462 if (sds->busiest->flags & SD_SHARE_CPUCAPACITY)
12474 if (smt_vs_nonsmt_groups(sds->busiest, sg)) {
12936 * @sds: variable to hold the statistics for this sched_domain.
12939 static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sds)
12942 struct sg_lb_stats *local = &sds->local_stat;
12955 sds->local = sg;
12963 update_sg_lb_stats(env, sds, sg, sgs, &sg_overloaded);
12965 if (!local_group && update_sd_pick_busiest(env, sds, sg, sgs)) {
12966 sds->busiest = sg;
12967 sds->busiest_stat = *sgs;
12973 sds->total_load += sgs->group_load;
12974 sds->total_capacity += sgs->group_capacity;
12985 if (sds->busiest)
12986 sds->prefer_sibling = !!(sds->busiest->flags & SD_PREFER_SIBLING);
12990 env->fbq_type = fbq_classify_group(&sds->busiest_stat);
13009 * @sds: statistics of the sched_domain whose imbalance is to be calculated.
13011 static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *sds)
13015 local = &sds->local_stat;
13016 busiest = &sds->busiest_stat;
13106 if (busiest->group_weight == 1 || sds->prefer_sibling) {
13112 env->imbalance = sibling_imbalance(env, sds, busiest, local);
13161 sds->avg_load = (sds->total_load * SCHED_CAPACITY_SCALE) /
13162 sds->total_capacity;
13168 if (local->avg_load >= sds->avg_load) {
13185 (busiest->avg_load - sds->avg_load) * busiest->group_capacity,
13186 (sds->avg_load - local->avg_load) * local->group_capacity
13225 struct sd_lb_stats sds;
13227 init_sd_lb_stats(&sds);
13233 update_sd_lb_stats(env, &sds);
13236 if (!sds.busiest)
13239 busiest = &sds.busiest_stat;
13261 local = &sds.local_stat;
13282 sds.avg_load = (sds.total_load * SCHED_CAPACITY_SCALE) /
13283 sds.total_capacity;
13289 if (local->avg_load >= sds.avg_load)
13305 if (sds.prefer_sibling && local->group_type == group_has_spare &&
13307 sibling_imbalance(env, &sds, busiest, local) > 1))
13321 smt_vs_nonsmt_groups(sds.local, sds.busiest)) {
13350 calculate_imbalance(env, &sds);
13351 return env->imbalance ? sds.busiest : NULL;
14432 struct sched_domain_shared *sds;
14523 sds = rcu_dereference_all(per_cpu(sd_balance_shared, cpu));
14524 if (sds) {
14534 nr_busy = atomic_read(&sds->nr_busy_cpus);