Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sd_init

Proto: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)

Type:struct sched_domain

Parameter:

TypeParameterName
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  If sd_flags Then sd_flags = sd_flags
1331  If WARN_ONCE(sd_flags & ~SD_flags allowed in topology descriptions, "wrong sd_flags in topology description\n") Then 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  If flags & SD_ASYM_CPUCAPACITY Then
1378  t = sd
1383  If child Then flags &= ~SD_PREFER_SIBLING
1386  for_each_lower_domain(tflags |= SD_BALANCE_WAKE
1390  If flags & SD_SHARE_CPUCAPACITY Then
1391  imbalance_pct = 110
1393  Else if flags & SD_SHARE_PKG_RESOURCES Then
1394  imbalance_pct = 117
1395  cache_nice_tries = 1
1398  Else if flags & SD_NUMA Then
1399  cache_nice_tries = 2
1401  flags &= ~SD_PREFER_SIBLING
1402  flags |= SD_SERIALIZE
1410  Else
1411  cache_nice_tries = 1
1418  If flags & SD_SHARE_PKG_RESOURCES Then
1419  shared = per_cpu_ptr(sds, sd_id)
1420  atomic_inc( & ref)
1421  atomic_set( & nr_busy_cpus, sd_weight)
1424  private = sdd
1426  Return sd
Caller
NameDescribe
build_sched_domain