Function report |
Source Code:kernel\sched\topology.c |
Create Date:2022-07-28 09:42:56 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Build sched domains for a given set of CPUs and attach the sched domains* to the individual CPUs
Proto:static int build_sched_domains(const struct cpumask *cpu_map, struct sched_domain_attr *attr)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
const struct cpumask * | cpu_map | |
struct sched_domain_attr * | attr |
1984 | alloc_state = sa_none |
1990 | bool has_asym = false |
1992 | If WARN_ON(pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear.) Then Go to error |
1995 | alloc_state = __visit_domain_allocation_hell( & d, cpu_map) |
1996 | If alloc_state != sa_rootdomain Then Go to error |
1999 | tl_asym = Find the sched_domain_topology_level where all CPU capacities are visible* for all CPUs. |
2005 | sd = NULL |
2007 | dflags = 0 |
2010 | dflags |= SD_ASYM_CPUCAPACITY |
2011 | has_asym = true |
2014 | If WARN_ON(!Ensure topology masks are sane, i.e. there are no conflicts (overlaps) for* any two given CPUs at this (non-NUMA) topology level.) Then Go to error |
2019 | If tl == sched_domain_topology Then per_cpu_ptr(sd, i) = sd |
2021 | If flags & SDTL_OVERLAP Then flags |= SD_OVERLAP |
2031 | span_weight = pumask_weight - Count of bits in *srcp*@srcp: the cpumask to count bits (< nr_cpu_ids) in. |
2032 | If flags & SD_OVERLAP Then |
2033 | If build_overlap_sched_groups(sd, i) Then Go to error |
2035 | Else |
2057 | sd = per_cpu_ptr(sd, i) |
2060 | If cpu_capacity_orig > READ_ONCE(max_cpu_capacity) Then WRITE_ONCE(max_cpu_capacity, cpu_capacity_orig) |
2067 | If has_asym Then static_branch_inc_cpuslocked( & sched_asym_cpucapacity) |
2070 | If rq && sched_debug_enabled Then |
2071 | pr_info("root domain span: %*pbl (max cpu_capacity = %lu)\n", cpumask_pr_args - printf args to output a cpumask*@maskp: cpumask to be printed* Can be used to provide arguments for '%*pb[l]' when printing a cpumask.(cpu_map), max_cpu_capacity) |
2075 | ret = 0 |
2076 | error : |
2077 | __free_domain_allocs( & d, alloc_state, cpu_map) |
2079 | Return ret |
Name | Describe |
---|---|
sched_init_domains | Set up scheduler domains and groups. For now this just excludes isolated* CPUs, but could be used to exclude other special cases in the future. |
partition_sched_domains_locked | Partition sched domains as specified by the 'ndoms_new'* cpumasks in the array doms_new[] of cpumasks. This compares* doms_new[] to the current sched domain partitioning, doms_cur[].* It destroys each deleted domain and builds each new domain. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |