Function report |
Source Code:kernel\irq\affinity.c |
Create Date:2022-07-28 10:16:04 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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.
Proto:struct irq_affinity_desc *irq_create_affinity_masks(unsigned int nvecs, struct irq_affinity *affd)
Type:struct irq_affinity_desc
Parameter:
Type | Parameter | Name |
---|---|---|
unsigned int | nvecs | |
struct irq_affinity * | affd |
419 | struct irq_affinity_desc * masks = NULL |
427 | If nvecs > pre_vectors + post_vectors Then affvecs = nvecs - pre_vectors - post_vectors |
429 | Else affvecs = 0 |
436 | If Not calc_sets Then calc_sets = default_calc_sets |
442 | If WARN_ON_ONCE(nr_sets > IRQ_AFFINITY_MAX_SETS) Then Return NULL |
446 | If Not affvecs Then Return NULL |
449 | masks = kcalloc - allocate memory for an array. The memory is set to zero.*@n: number of elements.*@size: element size.*@flags: the type of memory to allocate (see kmalloc). |
450 | If Not masks Then Return NULL |
454 | When curvec < pre_vectors cycle pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask |
465 | ret = ld affinity in two stages:* 1) spread present CPU on these vectors* 2) spread other possible CPUs on these vectors |
467 | If ret Then |
476 | If usedvecs >= affvecs Then curvec = pre_vectors + affvecs |
478 | Else curvec = pre_vectors + usedvecs |
480 | When curvec < nvecs cycle pumask_copy - *dstp = *srcp*@dstp: the result*@srcp: the input cpumask |
484 | When i < nvecs - post_vectors cycle is_managed = 1 |
487 | Return masks |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |