mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
irq/affinity: Fix extra vecs calculation
This fixes a math error calculating the extra_vecs. The error assumed
only 1 cpu per vector, but the value needs to account for the actual
number of cpus per vector in order to get the correct remainder for
extra CPU assignment.
Fixes: 7bf8222b9b ("irq/affinity: Fix CPU spread for unbalanced nodes")
Reported-by: Xiaolong Ye <[email protected]>
Signed-off-by: Keith Busch <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
This commit is contained in:
parent
7bf8222b9b
commit
3412386b53
1 changed files with 1 additions and 1 deletions
|
|
@ -108,7 +108,7 @@ irq_create_affinity_masks(int nvecs, const struct irq_affinity *affd)
|
|||
vecs_to_assign = min(vecs_per_node, ncpus);
|
||||
|
||||
/* Account for rounding errors */
|
||||
extra_vecs = ncpus - vecs_to_assign;
|
||||
extra_vecs = ncpus - vecs_to_assign * (ncpus / vecs_to_assign);
|
||||
|
||||
for (v = 0; curvec < last_affv && v < vecs_to_assign;
|
||||
curvec++, v++) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue