Lines Matching +full:3 +full:rd
348 * 3. no SMT is detected.
350 * 5. schedutil is driving the frequency of all CPUs of the rd;
377 struct root_domain *rd = cpu_rq(cpu)->rd; in build_perf_domains() local
387 pr_info("rd %*pbl: CPUs do not have asymmetric capacities\n", in build_perf_domains()
395 pr_warn("rd %*pbl: Disabling EAS, SMT is not supported\n", in build_perf_domains()
402 pr_warn("rd %*pbl: Disabling EAS: frequency-invariant load tracking not yet supported", in build_perf_domains()
420 if (rd->pd) in build_perf_domains()
421 pr_warn("rd %*pbl: Disabling EAS, schedutil is mandatory\n", in build_perf_domains()
443 WARN(1, "rd %*pbl: Failed to start EAS, EM complexity is too high\n", in build_perf_domains()
451 tmp = rd->pd; in build_perf_domains()
452 rcu_assign_pointer(rd->pd, pd); in build_perf_domains()
460 tmp = rd->pd; in build_perf_domains()
461 rcu_assign_pointer(rd->pd, NULL); in build_perf_domains()
473 struct root_domain *rd = container_of(rcu, struct root_domain, rcu); in free_rootdomain() local
475 cpupri_cleanup(&rd->cpupri); in free_rootdomain()
476 cpudl_cleanup(&rd->cpudl); in free_rootdomain()
477 free_cpumask_var(rd->dlo_mask); in free_rootdomain()
478 free_cpumask_var(rd->rto_mask); in free_rootdomain()
479 free_cpumask_var(rd->online); in free_rootdomain()
480 free_cpumask_var(rd->span); in free_rootdomain()
481 free_pd(rd->pd); in free_rootdomain()
482 kfree(rd); in free_rootdomain()
485 void rq_attach_root(struct rq *rq, struct root_domain *rd) in rq_attach_root() argument
492 if (rq->rd) { in rq_attach_root()
493 old_rd = rq->rd; in rq_attach_root()
509 atomic_inc(&rd->refcount); in rq_attach_root()
510 rq->rd = rd; in rq_attach_root()
512 cpumask_set_cpu(rq->cpu, rd->span); in rq_attach_root()
522 void sched_get_rd(struct root_domain *rd) in sched_get_rd() argument
524 atomic_inc(&rd->refcount); in sched_get_rd()
527 void sched_put_rd(struct root_domain *rd) in sched_put_rd() argument
529 if (!atomic_dec_and_test(&rd->refcount)) in sched_put_rd()
532 call_rcu(&rd->rcu, free_rootdomain); in sched_put_rd()
535 static int init_rootdomain(struct root_domain *rd) in init_rootdomain() argument
537 if (!zalloc_cpumask_var(&rd->span, GFP_KERNEL)) in init_rootdomain()
539 if (!zalloc_cpumask_var(&rd->online, GFP_KERNEL)) in init_rootdomain()
541 if (!zalloc_cpumask_var(&rd->dlo_mask, GFP_KERNEL)) in init_rootdomain()
543 if (!zalloc_cpumask_var(&rd->rto_mask, GFP_KERNEL)) in init_rootdomain()
547 rd->rto_cpu = -1; in init_rootdomain()
548 raw_spin_lock_init(&rd->rto_lock); in init_rootdomain()
549 rd->rto_push_work = IRQ_WORK_INIT_HARD(rto_push_irq_work_func); in init_rootdomain()
552 rd->visit_gen = 0; in init_rootdomain()
553 init_dl_bw(&rd->dl_bw); in init_rootdomain()
554 if (cpudl_init(&rd->cpudl) != 0) in init_rootdomain()
557 if (cpupri_init(&rd->cpupri) != 0) in init_rootdomain()
562 cpudl_cleanup(&rd->cpudl); in init_rootdomain()
564 free_cpumask_var(rd->rto_mask); in init_rootdomain()
566 free_cpumask_var(rd->dlo_mask); in init_rootdomain()
568 free_cpumask_var(rd->online); in init_rootdomain()
570 free_cpumask_var(rd->span); in init_rootdomain()
590 struct root_domain *rd; in alloc_rootdomain() local
592 rd = kzalloc(sizeof(*rd), GFP_KERNEL); in alloc_rootdomain()
593 if (!rd) in alloc_rootdomain()
596 if (init_rootdomain(rd) != 0) { in alloc_rootdomain()
597 kfree(rd); in alloc_rootdomain()
601 return rd; in alloc_rootdomain()
707 cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu) in cpu_attach_domain() argument
756 rq_attach_root(rq, rd); in cpu_attach_domain()
767 struct root_domain *rd; member
797 * node 0 1 2 3
801 * 3: 20 30 20 10
809 * 3 ----- 2
815 * For the above NUMA topology that gives 3 levels:
817 * NUMA-2 0-3 0-3 0-3 0-3
818 * groups: {0-1,3},{1-3} {0-2},{0,2-3} {1-3},{0-1,3} {0,2-3},{0-2}
820 * NUMA-1 0-1,3 0-2 1-3 0,2-3
821 * groups: {0},{1},{3} {0},{1},{2} {1},{2},{3} {0},{2},{3}
823 * NUMA-0 0 1 2 3
832 * domain. For instance Node-0 NUMA-2 would only get groups: 0-1,3 and 1-3.
837 * gets us the first 0-1,3
838 * - the only uncovered node is 2, who's child domain is 1-3.
843 * end up at those groups (they would end up in group: 0-1,3).
858 * node 0 1 2 3
862 * 3: 30 20 20 10
870 * 2 ----- 3
872 * This topology is asymmetric, nodes 1,2 are fully connected, but nodes 0,3
878 * NUMA-2 0-3 0-3
879 * groups: {0-2},{1-3} {1-3},{0-2}
881 * NUMA-1 0-2 0-3 0-3 1-3
883 * NUMA-0 0 1 2 3
1046 * But for machines whose NUMA diameter are 3 or above, we move in build_overlap_sched_groups()
1051 * Smallest diameter=3 topology is: in build_overlap_sched_groups()
1053 * node 0 1 2 3 in build_overlap_sched_groups()
1057 * 3: 40 30 20 10 in build_overlap_sched_groups()
1059 * 0 --- 1 --- 2 --- 3 in build_overlap_sched_groups()
1061 * NUMA-3 0-3 N/A N/A 0-3 in build_overlap_sched_groups()
1062 * groups: {0-2},{1-3} {1-3},{0-2} in build_overlap_sched_groups()
1064 * NUMA-2 0-2 0-3 0-3 1-3 in build_overlap_sched_groups()
1065 * groups: {0-1},{1-3} {0-2},{2-3} {1-3},{0-1} {2-3},{0-2} in build_overlap_sched_groups()
1067 * NUMA-1 0-1 0-2 1-3 2-3 in build_overlap_sched_groups()
1068 * groups: {0},{1} {1},{2},{0} {2},{3},{1} {3},{2} in build_overlap_sched_groups()
1070 * NUMA-0 0 1 2 3 in build_overlap_sched_groups()
1072 * The NUMA-2 groups for nodes 0 and 3 are obviously buggered, as the in build_overlap_sched_groups()
1118 * The tree consists of 3 primary data structures:
1134 * CPU 0 1 2 3 4 5 6 7
1143 * MC 0-3 0-3 0-3 0-3 4-7 4-7 4-7 4-7
1144 * SMT 0-1 0-1 2-3 2-3 4-5 4-5 6-7 6-7
1146 * CPU 0 1 2 3 4 5 6 7
1453 if (!atomic_read(&d->rd->refcount)) in __free_domain_allocs()
1454 free_rootdomain(&d->rd->rcu); in __free_domain_allocs()
1477 d->rd = alloc_rootdomain(); in __visit_domain_allocation_hell()
1478 if (!d->rd) in __visit_domain_allocation_hell()
2339 imb = sd->span_weight >> 3; in build_sched_domains()
2377 if (rq->cpu_capacity_orig > READ_ONCE(d.rd->max_cpu_capacity)) in build_sched_domains()
2378 WRITE_ONCE(d.rd->max_cpu_capacity, rq->cpu_capacity_orig); in build_sched_domains()
2380 cpu_attach_domain(sd, d.rd, i); in build_sched_domains()
2389 cpumask_pr_args(cpu_map), rq->rd->max_cpu_capacity); in build_sched_domains()
2568 struct root_domain *rd; in partition_sched_domains_locked() local
2576 rd = cpu_rq(cpumask_any(doms_cur[i]))->rd; in partition_sched_domains_locked()
2577 dl_clear_root_domain(rd); in partition_sched_domains_locked()
2613 cpu_rq(cpumask_first(doms_cur[j]))->rd->pd) { in partition_sched_domains_locked()
2618 /* No match - add perf. domains for a new rd */ in partition_sched_domains_locked()