函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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.

函数原型:void partition_sched_domains_locked(int ndoms_new, cpumask_var_t doms_new[], struct sched_domain_attr *dattr_new)

返回类型:void

参数:

类型参数名称
intndoms_new
cpumask_var_tdoms_new
struct sched_domain_attr *dattr_new
2221  __maybe_unused等于has_eas
2225  lockdep_assert_held( & SPDX-License-Identifier: GPL-2.0)
2228  unregister_sched_domain_sysctl()
2231  new_topology等于arch_update_cpu_topology lets virtualized architectures update the* CPU core maps. It is supposed to return 1 if the topology changed* or 0 if it stayed the same.
2233  如果非doms_new
2234  WARN_ON_ONCE(dattr_new)
2235  n等于0
2236  doms_new等于alloc_sched_domains(1)
2237  如果doms_new
2238  n等于1
2242  否则
2243  n等于ndoms_new
2247 i小于Number of sched domains in 'doms_cur': 循环
2248 j小于n且非new_topology循环
2259  rd = ( & ( * ({
2259  ({
2259  循环
2259  const void * __vpp_verify = NULL
2259  当0循环
2259  runqueues的地址
2259  })
2259  })))->rd
2261  转到:match1
2265  Detach sched domains from a group of CPUs specified in cpu_map* These CPUs will now be attached to the NULL domain
2266  match1 :
2270  n等于Number of sched domains in 'doms_cur':
2271  如果非doms_new
2272  n等于0
2273  doms_new等于Special case: If a kmalloc() of a doms_cur partition (array of* cpumask) fails, then fallback to a single sched domain,* as determined by the single cpumask fallback_doms.
2274  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
2279 i小于ndoms_new循环
2280 j小于n且非new_topology循环
2286  Build sched domains for a given set of CPUs and attach the sched domains* to the individual CPUs
2287  match2 :
2310  如果Current sched domains: 不等于Special case: If a kmalloc() of a doms_cur partition (array of* cpumask) fails, then fallback to a single sched domain,* as determined by the single cpumask fallback_doms.free_sched_domains(Current sched domains: , Number of sched domains in 'doms_cur': )
2313  释放内存
2314  Current sched domains: 等于doms_new
2315  Attribues of custom domains in 'doms_cur' 等于dattr_new
2316  Number of sched domains in 'doms_cur': 等于ndoms_new
2318  register_sched_domain_sysctl()
调用者
名称描述
partition_sched_domainsCall with hotplug lock held