Lines Matching defs:sgc
94 group->sgc->id,
103 if (group->sgc->capacity != SCHED_CAPACITY_SCALE)
104 printk(KERN_CONT " cap=%lu", group->sgc->capacity);
619 if (free_sgc && atomic_dec_and_test(&sg->sgc->ref))
620 kfree(sg->sgc);
991 sg->sgc = *per_cpu_ptr(sdd->sgc, cpu);
992 if (atomic_inc_return(&sg->sgc->ref) == 1)
998 * Initialize sgc->capacity such that even if we mess up the
1003 sg->sgc->capacity = SCHED_CAPACITY_SCALE * cpumask_weight(sg_span);
1004 sg->sgc->min_capacity = SCHED_CAPACITY_SCALE;
1005 sg->sgc->max_capacity = SCHED_CAPACITY_SCALE;
1021 * As we are referencing sgc across different topology level, we need
1210 sg->sgc = *per_cpu_ptr(sdd->sgc, cpu);
1214 /* sgc visits should follow a similar trend as sg */
1215 WARN_ON(already_visited != (atomic_inc_return(&sg->sgc->ref) > 1));
1230 sg->sgc->capacity = SCHED_CAPACITY_SCALE * cpumask_weight(sched_group_span(sg));
1231 sg->sgc->min_capacity = SCHED_CAPACITY_SCALE;
1232 sg->sgc->max_capacity = SCHED_CAPACITY_SCALE;
1240 * and will initialize their ->sgc.
1541 if (atomic_read(&(*per_cpu_ptr(sdd->sgc, cpu))->ref))
1542 *per_cpu_ptr(sdd->sgc, cpu) = NULL;
2235 sdd->sgc = alloc_percpu(struct sched_group_capacity *);
2236 if (!sdd->sgc)
2243 struct sched_group_capacity *sgc;
2268 sgc = kzalloc_node(sizeof(struct sched_group_capacity) + cpumask_size(),
2270 if (!sgc)
2274 sgc->id = j;
2277 *per_cpu_ptr(sdd->sgc, j) = sgc;
2306 if (sdd->sgc)
2307 kfree(*per_cpu_ptr(sdd->sgc, j));
2315 free_percpu(sdd->sgc);
2316 sdd->sgc = NULL;