函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ld affinity in two stages:* 1) spread present CPU on these vectors* 2) spread other possible CPUs on these vectors

函数原型:static int irq_build_affinity_masks(unsigned int startvec, unsigned int numvecs, unsigned int firstvec, struct irq_affinity_desc *masks)

返回类型:int

参数:

类型参数名称
unsigned intstartvec
unsigned intnumvecs
unsigned intfirstvec
struct irq_affinity_desc *masks
342  curvec等于startvec, nr_present等于0, nr_others等于0
345  ret等于负ENOMEM
347  如果非zalloc_cpumask_var( & nmsk, GFP_KERNEL)则返回:ret
350  如果非zalloc_cpumask_var( & npresmsk, GFP_KERNEL)则转到:fail_nmsk
353  node_to_cpumask等于alloc_node_to_cpumask()
354  如果非node_to_cpumask则转到:fail_npresmsk
358  get_online_cpus()
359  build_node_to_cpumask(node_to_cpumask)
362  ret等于__irq_build_affinity_masks(curvec, numvecs, firstvec, node_to_cpumask, cpu_present_mask, nmsk, masks)
365  如果ret小于0则转到:fail_build_affinity
367  nr_present等于ret
375  如果nr_present大于等于numvecscurvec等于firstvec
377  否则curvec等于firstvecnr_present
379  pumask_andnot - *dstp = *src1p & ~*src2p*@dstp: the cpumask result*@src1p: the first input*@src2p: the second input* If *@dstp is empty, returns 0, else returns 1
380  ret等于__irq_build_affinity_masks(curvec, numvecs, firstvec, node_to_cpumask, npresmsk, nmsk, masks)
383  如果ret大于等于0则nr_others等于ret
386  fail_build_affinity :
387  put_online_cpus()
389  如果ret大于等于0则WARN_ON(nr_present + nr_others < numvecs)
392  free_node_to_cpumask(node_to_cpumask)
394  fail_npresmsk :
395  释放CPU掩码
397  fail_nmsk :
398  释放CPU掩码
399  返回:如果ret小于0则ret否则0
调用者
名称描述
irq_create_affinity_masksq_create_affinity_masks - Create affinity masks for multiqueue spreading*@nvecs: The total number of vectors*@affd: Description of the affinity requirements* Returns the irq_affinity_desc pointer or NULL if allocation failed.