函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Initialize sched groups cpu_capacity

函数原型:static void init_sched_groups_capacity(int cpu, struct sched_domain *sd)

返回类型:void

参数:

类型参数名称
intcpu
struct sched_domain *sd
1149  sg等于groups
1151  WARN_ON(!sg)
1153  循环
1154  max_cpu等于负1
1156  group_weight等于pumask_weight - Count of bits in *srcp*@srcp: the cpumask to count bits (< nr_cpu_ids) in.
1158  如果非flags按位与SD_ASYM_PACKING的值则转到:next
1162  如果max_cpu小于0则max_cpu等于cpu
1164  否则如果sched_asym_prefer(cpu, max_cpu)则max_cpu等于cpu
1167  asym_prefer_cpu等于max_cpu
1169  :
1170  sg等于next
1171 sg不等于groups循环
1173  如果cpu不等于Return the canonical balance CPU for this group, this is the first CPU* of this group that's also in the balance mask.* The balance mask are all those CPUs that could actually end up at this* group. See build_balance_mask().* Also see should_we_balance().则返回
1176  update_group_capacity(sd, cpu)
调用者
名称描述
build_sched_domainsBuild sched domains for a given set of CPUs and attach the sched domains* to the individual CPUs