函数逻辑报告 |
Source Code:kernel\sched\topology.c |
Create Date:2022-07-27 10:43:25 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Build sched domains for a given set of CPUs and attach the sched domains* to the individual CPUs
函数原型:static int build_sched_domains(const struct cpumask *cpu_map, struct sched_domain_attr *attr)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
const struct cpumask * | cpu_map | |
struct sched_domain_attr * | attr |
1984 | alloc_state等于sa_none |
1990 | bool has_asym = false |
1992 | 如果WARN_ON(pumask_empty - *srcp == 0*@srcp: the cpumask to that all cpus < nr_cpu_ids are clear.)则转到:error |
1995 | alloc_state等于__visit_domain_allocation_hell( & d, cpu_map) |
1996 | 如果alloc_state不等于sa_rootdomain则转到: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 | 如果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.)则转到:error |
2019 | 如果tl恒等于sched_domain_topology则per_cpu_ptr(sd, i)等于sd |
2021 | 如果flags按位与SDTL_OVERLAP则flags或等于SD_OVERLAP |
2031 | span_weight等于pumask_weight - Count of bits in *srcp*@srcp: the cpumask to count bits (< nr_cpu_ids) in. |
2032 | 如果flags按位与SD_OVERLAP则 |
2033 | 如果build_overlap_sched_groups(sd, i)则转到:error |
2035 | 否则 |
2044 | 如果非测试CPU信息则继续下一循环 |
2057 | sd等于per_cpu_ptr(sd, i) |
2060 | 如果cpu_capacity_orig大于READ_ONCE(max_cpu_capacity)则WRITE_ONCE(max_cpu_capacity, cpu_capacity_orig) |
2070 | 如果rq且sched_debug_enabled则 |
2071 | 打印信息("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 | 返回:ret |
名称 | 描述 |
---|---|
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. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |