Lines Matching defs:cg

355     struct cpu_group *cg, int indent);
673 cpu_search_lowest(const struct cpu_group *cg, const struct cpu_search *s,
685 if (cg->cg_children > 0) {
686 for (c = cg->cg_children - 1; c >= 0; c--) {
687 load = cpu_search_lowest(&cg->cg_child[c], s, &lr);
696 (cg->cg_child[c].cg_flags & CG_FLAG_THREAD) &&
711 for (c = cg->cg_last; c >= cg->cg_first; c--) {
712 if (!CPU_ISSET(c, &cg->cg_mask))
755 cpu_search_highest(const struct cpu_group *cg, const struct cpu_search *s,
767 if (cg->cg_children > 0) {
768 for (c = cg->cg_children - 1; c >= 0; c--) {
769 load = cpu_search_highest(&cg->cg_child[c], s, &lr);
782 for (c = cg->cg_last; c >= cg->cg_first; c--) {
783 if (!CPU_ISSET(c, &cg->cg_mask))
813 sched_lowest(const struct cpu_group *cg, cpuset_t *mask, int pri, int maxload,
824 cpu_search_lowest(cg, &s, &r);
832 sched_highest(const struct cpu_group *cg, cpuset_t *mask, int minload,
841 cpu_search_highest(cg, &s, &r);
846 sched_balance_group(struct cpu_group *cg)
855 high = sched_highest(cg, &hmask, 1, 0);
887 low = sched_lowest(cg, &lmask, -1, TDQ_LOAD(tdq) - 1, high, 1);
1025 struct cpu_group *cg, *parent;
1036 for (cg = tdq->tdq_cg, goup = 0; ; ) {
1037 cpu = sched_highest(cg, &mask, steal_thresh, 1);
1053 cg = cg->cg_parent;
1056 parent = cg->cg_parent;
1060 if (cg == &parent->cg_child[0])
1061 cg = &parent->cg_child[1];
1063 cg = &parent->cg_child[0];
1066 cg = parent;
1321 struct cpu_group *cg, *ccg;
1351 cg = tdq->tdq_cg;
1356 cg = tdq->tdq_cg;
1365 if (cg->cg_flags & CG_FLAG_THREAD) {
1367 for (cpu = cg->cg_first; cpu <= cg->cg_last; cpu++) {
1370 if (CPU_ISSET(cpu, &cg->cg_mask) &&
1374 if (cpu > cg->cg_last) {
1389 for (ccg = NULL; cg != NULL; cg = cg->cg_parent) {
1390 if (cg->cg_flags & CG_FLAG_THREAD)
1392 if (cg->cg_children == 1 || cg->cg_count == 1)
1394 if (cg->cg_level == CG_SHARE_NONE ||
1395 (!intr && !SCHED_AFFINITY(ts, cg->cg_level)))
1397 ccg = cg;
2026 struct cpu_group *cg, *parent;
2039 for (i = 1, cg = tdq->tdq_cg, goup = 0; ; ) {
2040 cpu = sched_highest(cg, &mask, steal_thresh, 1);
2058 cg = cg->cg_parent;
2065 parent = cg->cg_parent;
2071 if (cg == &parent->cg_child[0])
2072 cg = &parent->cg_child[1];
2074 cg = &parent->cg_child[0];
2077 cg = parent;
3208 sysctl_kern_sched_topology_spec_internal(struct sbuf *sb, struct cpu_group *cg,
3215 "", 1 + indent / 2, cg->cg_level);
3217 cg->cg_count, cpusetobj_strprint(cpusetbuf, &cg->cg_mask));
3219 for (i = cg->cg_first; i <= cg->cg_last; i++) {
3220 if (CPU_ISSET(i, &cg->cg_mask)) {
3230 if (cg->cg_flags != 0) {
3232 if ((cg->cg_flags & CG_FLAG_HTT) != 0)
3234 if ((cg->cg_flags & CG_FLAG_THREAD) != 0)
3236 if ((cg->cg_flags & CG_FLAG_SMT) != 0)
3238 if ((cg->cg_flags & CG_FLAG_NODE) != 0)
3243 if (cg->cg_children > 0) {
3245 for (i = 0; i < cg->cg_children; i++)
3247 &cg->cg_child[i], indent+2);