函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型: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)

返回类型:void

参数:

类型参数名称
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 n小于nr_node_ids循环
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  如果非ncpus则继续下一循环
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, node_vectors[0]的长度, ncpus_cmp_func, NULL)
227 n小于nr_node_ids循环
230  如果ncpus恒等于UINT_MAX则继续下一循环
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
调用者
名称描述
__irq_build_affinity_masks