Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\topology.c Create Date:2022-07-28 09:42:13
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Initialize sched groups cpu_capacity

Proto:static void init_sched_groups_capacity(int cpu, struct sched_domain *sd)

Type:void

Parameter:

TypeParameterName
intcpu
struct sched_domain *sd
1149  sg = groups
1151  WARN_ON(!sg)
1153  Do
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  If Not (flags & SD_ASYM_PACKING) Then Go to next
1162  If max_cpu < 0 Then max_cpu = cpu
1164  Else if sched_asym_prefer(cpu, max_cpu) Then max_cpu = cpu
1167  asym_prefer_cpu = max_cpu
1169  :
1170  sg = next
1171  When sg != groups cycle
1173  If 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(). Then Return
1176  update_group_capacity(sd, cpu)
Caller
NameDescribe
build_sched_domainsBuild sched domains for a given set of CPUs and attach the sched domains* to the individual CPUs