Lines Matching +full:- +full:affinity

1 // SPDX-License-Identifier: GPL-2.0
4 * Copyright (C) 2016-2017 Christoph Hellwig.
14 affd->nr_sets = 1; in default_calc_sets()
15 affd->set_size[0] = affvecs; in default_calc_sets()
19 * irq_create_affinity_masks - Create affinity masks for multiqueue spreading
21 * @affd: Description of the affinity requirements
37 if (nvecs > affd->pre_vectors + affd->post_vectors) in irq_create_affinity_masks()
38 affvecs = nvecs - affd->pre_vectors - affd->post_vectors; in irq_create_affinity_masks()
46 if (!affd->calc_sets) in irq_create_affinity_masks()
47 affd->calc_sets = default_calc_sets; in irq_create_affinity_masks()
50 affd->calc_sets(affd, affvecs); in irq_create_affinity_masks()
52 if (WARN_ON_ONCE(affd->nr_sets > IRQ_AFFINITY_MAX_SETS)) in irq_create_affinity_masks()
63 /* Fill out vectors at the beginning that don't need affinity */ in irq_create_affinity_masks()
64 for (curvec = 0; curvec < affd->pre_vectors; curvec++) in irq_create_affinity_masks()
68 * Spread on present CPUs starting from affd->pre_vectors. If we in irq_create_affinity_masks()
69 * have multiple sets, build each sets affinity mask separately. in irq_create_affinity_masks()
71 for (i = 0, usedvecs = 0; i < affd->nr_sets; i++) { in irq_create_affinity_masks()
72 unsigned int this_vecs = affd->set_size[i]; in irq_create_affinity_masks()
89 /* Fill out vectors at the end that don't need affinity */ in irq_create_affinity_masks()
91 curvec = affd->pre_vectors + affvecs; in irq_create_affinity_masks()
93 curvec = affd->pre_vectors + usedvecs; in irq_create_affinity_masks()
98 for (i = affd->pre_vectors; i < nvecs - affd->post_vectors; i++) in irq_create_affinity_masks()
105 * irq_calc_affinity_vectors - Calculate the optimal number of vectors
108 * @affd: Description of the affinity requirements
113 unsigned int resv = affd->pre_vectors + affd->post_vectors; in irq_calc_affinity_vectors()
119 if (affd->calc_sets) { in irq_calc_affinity_vectors()
120 set_vecs = maxvec - resv; in irq_calc_affinity_vectors()
127 return resv + min(set_vecs, maxvec - resv); in irq_calc_affinity_vectors()