Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\irq\affinity.c Create Date:2022-07-28 10:15:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Allocate vector number for each node, so that for each node:* 1) the allocated number is >= 1* 2) the allocated numbver is <= active CPU number of this node* The actual allocated total vectors may be less than @numvecs when

Proto:static void alloc_nodes_vectors(unsigned int numvecs, cpumask_var_t *node_to_cpumask, const struct cpumask *cpu_mask, const nodemask_t nodemsk, struct cpumask *nmsk, struct node_vectors *node_vectors)

Type:void

Parameter:

TypeParameterName
unsigned intnumvecs
cpumask_var_t *node_to_cpumask
const struct cpumask *cpu_mask
const nodemask_tnodemsk
struct cpumask *nmsk
struct node_vectors *node_vectors
135  remaining_ncpus = 0
137  When n < nr_node_ids cycle
138  id = n
139  ncpus = UINT_MAX
145  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
146  ncpus = pumask_weight - Count of bits in *srcp*@srcp: the cpumask to count bits (< nr_cpu_ids) in.
148  If Not ncpus Then Continue
150  remaining_ncpus += ncpus
151  ncpus = ncpus
154  numvecs = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(unsigned, remaining_ncpus, numvecs)
156  sort(node_vectors, nr_node_ids, size of node_vectors[0] , ncpus_cmp_func, NULL)
227  When n < nr_node_ids cycle
230  If ncpus == UINT_MAX Then Continue
233  WARN_ON_ONCE(numvecs == 0)
235  ncpus = ncpus
236  nvectors = max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(unsigned, 1, numvecs * ncpus / remaining_ncpus)
238  WARN_ON_ONCE(nvectors > ncpus)
240  nvectors = nvectors
242  remaining_ncpus -= ncpus
243  numvecs -= nvectors
Caller
NameDescribe
__irq_build_affinity_masks