函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:struct irq_affinity_desc *irq_create_affinity_masks(unsigned int nvecs, struct irq_affinity *affd)

返回类型:struct irq_affinity_desc

参数:

类型参数名称
unsigned intnvecs
struct irq_affinity *affd
419  struct irq_affinity_desc * masks = NULL
427  如果nvecs大于pre_vectorspost_vectorsaffvecs等于nvecspre_vectorspost_vectors
429  否则affvecs等于0
436  如果非calc_setscalc_sets等于default_calc_sets
440  calc_sets(affd, affvecs)
442  如果WARN_ON_ONCE(nr_sets > IRQ_AFFINITY_MAX_SETS)则返回:NULL
446  如果非affvecs则返回:NULL
449  masks等于分配数组内存并置零
450  如果非masks则返回:NULL
454 curvec小于pre_vectors循环pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
461 i小于nr_sets循环
462  this_vecs等于set_size[i]
465  ret等于ld affinity in two stages:* 1) spread present CPU on these vectors* 2) spread other possible CPUs on these vectors
467  如果ret
468  释放内存
469  返回:NULL
471  curvec加等于this_vecs
472  usedvecs加等于this_vecs
476  如果usedvecs大于等于affvecscurvec等于pre_vectorsaffvecs
478  否则curvec等于pre_vectorsusedvecs
480 curvec小于nvecs循环pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask
484 i小于nvecspost_vectors循环is_managed等于1
487  返回:masks