函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\topology.c Create Date:2022-07-27 10:42:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:sd_init

函数原型:static struct sched_domain *sd_init(struct sched_domain_topology_level *tl, const struct cpumask *cpu_map, struct sched_domain *child, int dflags, int cpu)

返回类型:struct sched_domain

参数:

类型参数名称
struct sched_domain_topology_level *tl
const struct cpumask *cpu_map
struct sched_domain *child
intdflags
intcpu
1316  sdd等于data
1317  sd等于per_cpu_ptr(sd, cpu)
1318  sd_flags等于0
1324  sched_domains_curr_level等于numa_level
1327  sd_weight等于pumask_weight - Count of bits in *srcp*@srcp: the cpumask to count bits (< nr_cpu_ids) in.
1329  如果sd_flagssd_flags等于sd_flags
1331  如果WARN_ONCE(sd_flags & ~SD_flags allowed in topology descriptions, "wrong sd_flags in topology description\n")则sd_flags与等于SD_flags allowed in topology descriptions的反
1336  sd_flags或等于dflags
1338  * sd = (struct sched_domain){sd = sd_weight, sd = 2 * sd_weight, sd = 32, sd = 125, sd = 0, sd = 1 * SD_LOAD_BALANCE | 1 * SD_BALANCE_NEWIDLE | 1 * SD_BALANCE_EXEC | 1 * SD_BALANCE_FORK | 0 * SD_BALANCE_WAKE | 1 * SD_WAKE_AFFINE | 0 * SD_SHARE_CPUCAPACITY | 0 * SD_SHARE_PKG_RESOURCES | 0 * SD_SERIALIZE | 1 * SD_PREFER_SIBLING | 0 * SD_NUMA | sd_flags, sd = jiffies, sd = sd_weight, sd = 0, sd = jiffies, sd = child, }
1370  pumask_and - *dstp = *src1p & *src2p*@dstp: the cpumask result*@src1p: the first input*@src2p: the second input* If *@dstp is empty, returns 0, else returns 1
1371  sd_id等于Uniprocessor. Assume all masks are "1".
1377  如果flags按位与SD_ASYM_CPUCAPACITY
1378  t等于sd
1383  如果childflags与等于SD_PREFER_SIBLING的反
1386  for_each_lower_domain(tflags |= SD_BALANCE_WAKE
1390  如果flags按位与SD_SHARE_CPUCAPACITY
1391  imbalance_pct等于110
1393  否则如果flags按位与SD_SHARE_PKG_RESOURCES
1394  imbalance_pct等于117
1395  cache_nice_tries等于1
1398  否则如果flags按位与SD_NUMA
1399  cache_nice_tries等于2
1401  flags与等于SD_PREFER_SIBLING的反
1402  flags或等于SD_SERIALIZE
1404  flags与等于SD_BALANCE_EXEC按位或SD_BALANCE_FORK按位或SD_WAKE_AFFINE的值的反
1410  否则
1411  cache_nice_tries等于1
1418  如果flags按位与SD_SHARE_PKG_RESOURCES
1419  shared等于per_cpu_ptr(sds, sd_id)
1420  atomic_inc( & ref)
1421  atomic_set( & nr_busy_cpus, sd_weight)
1424  private等于sdd
1426  返回:sd
调用者
名称描述
build_sched_domain