Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:void partition_sched_domains_locked(int ndoms_new, cpumask_var_t doms_new[], struct sched_domain_attr *dattr_new)

Type:void

Parameter:

TypeParameterName
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  If Not doms_new Then
2234  WARN_ON_ONCE(dattr_new)
2235  n = 0
2236  doms_new = alloc_sched_domains(1)
2237  If doms_new Then
2238  n = 1
2242  Else
2243  n = ndoms_new
2247  When i < Number of sched domains in 'doms_cur': cycle
2248  When j < n && Not new_topology cycle
2259  rd = ( & ( * ({
2259  ({
2259  Do
2259  const void * __vpp_verify = NULL
2259  When 0 cycle
2259  &runqueues
2259  })
2259  })))->rd
2261  Go to 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  If Not doms_new Then
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  When i < ndoms_new cycle
2280  When j < n && Not new_topology cycle
2286  Build sched domains for a given set of CPUs and attach the sched domains* to the individual CPUs
2287  match2 :
2310  If 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. Then free_sched_domains(Current sched domains: , Number of sched domains in 'doms_cur': )
2313  free previously allocated memory
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()
Caller
NameDescribe
partition_sched_domainsCall with hotplug lock held