* [PATCH] irq/affinity: Fix calculating vectors to assign
@ 2017-04-19 23:51 Keith Busch
2017-04-20 14:06 ` [tip:irq/urgent] genirq/affinity: " tip-bot for Keith Busch
0 siblings, 1 reply; 3+ messages in thread
From: Keith Busch @ 2017-04-19 23:51 UTC (permalink / raw)
To: Thomas Gleixner, linux-kernel; +Cc: Andrei Vagin, Keith Busch
The vectors_per_node is calculated from the remaining available vectors.
The current vector starts after pre_vectors, so we need to subtract that
from the current to properly account for the number of remaining vectors
to assign.
Fixes: 3412386b531 ("irq/affinity: Fix extra vecs calculation")
Reported-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
---
kernel/irq/affinity.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
index d052947..e2d356d 100644
--- a/kernel/irq/affinity.c
+++ b/kernel/irq/affinity.c
@@ -98,7 +98,7 @@ irq_create_affinity_masks(int nvecs, const struct irq_affinity *affd)
int ncpus, v, vecs_to_assign, vecs_per_node;
/* Spread the vectors per node */
- vecs_per_node = (affv - curvec) / nodes;
+ vecs_per_node = (affv - (curvec - affd->pre_vectors)) / nodes;
/* Get the cpus on this node which are in the mask */
cpumask_and(nmsk, cpu_online_mask, cpumask_of_node(n));
--
2.7.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [tip:irq/urgent] genirq/affinity: Fix calculating vectors to assign
2017-04-19 23:51 [PATCH] irq/affinity: Fix calculating vectors to assign Keith Busch
@ 2017-04-20 14:06 ` tip-bot for Keith Busch
2017-04-22 4:37 ` Andrei Vagin
0 siblings, 1 reply; 3+ messages in thread
From: tip-bot for Keith Busch @ 2017-04-20 14:06 UTC (permalink / raw)
To: linux-tip-commits; +Cc: hpa, tglx, keith.busch, mingo, avagin, linux-kernel
Commit-ID: b72f8051f34b8164a62391e3676edc34523c5952
Gitweb: http://git.kernel.org/tip/b72f8051f34b8164a62391e3676edc34523c5952
Author: Keith Busch <keith.busch@intel.com>
AuthorDate: Wed, 19 Apr 2017 19:51:10 -0400
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 20 Apr 2017 16:03:09 +0200
genirq/affinity: Fix calculating vectors to assign
The vectors_per_node is calculated from the remaining available vectors.
The current vector starts after pre_vectors, so we need to subtract that
from the current to properly account for the number of remaining vectors
to assign.
Fixes: 3412386b531 ("irq/affinity: Fix extra vecs calculation")
Reported-by: Andrei Vagin <avagin@virtuozzo.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Link: http://lkml.kernel.org/r/1492645870-13019-1-git-send-email-keith.busch@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/irq/affinity.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
index d052947..e2d356d 100644
--- a/kernel/irq/affinity.c
+++ b/kernel/irq/affinity.c
@@ -98,7 +98,7 @@ irq_create_affinity_masks(int nvecs, const struct irq_affinity *affd)
int ncpus, v, vecs_to_assign, vecs_per_node;
/* Spread the vectors per node */
- vecs_per_node = (affv - curvec) / nodes;
+ vecs_per_node = (affv - (curvec - affd->pre_vectors)) / nodes;
/* Get the cpus on this node which are in the mask */
cpumask_and(nmsk, cpu_online_mask, cpumask_of_node(n));
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [tip:irq/urgent] genirq/affinity: Fix calculating vectors to assign
2017-04-20 14:06 ` [tip:irq/urgent] genirq/affinity: " tip-bot for Keith Busch
@ 2017-04-22 4:37 ` Andrei Vagin
0 siblings, 0 replies; 3+ messages in thread
From: Andrei Vagin @ 2017-04-22 4:37 UTC (permalink / raw)
To: keith.busch, hpa, tglx, linux-kernel, mingo; +Cc: linux-tip-commits
Looks like 4.11 will be release in a few days, it would be nice if this
commit reaches the upstream tree before this moment.
Thanks.
On Thu, Apr 20, 2017 at 07:06:49AM -0700, tip-bot for Keith Busch wrote:
> Commit-ID: b72f8051f34b8164a62391e3676edc34523c5952
> Gitweb: http://git.kernel.org/tip/b72f8051f34b8164a62391e3676edc34523c5952
> Author: Keith Busch <keith.busch@intel.com>
> AuthorDate: Wed, 19 Apr 2017 19:51:10 -0400
> Committer: Thomas Gleixner <tglx@linutronix.de>
> CommitDate: Thu, 20 Apr 2017 16:03:09 +0200
>
> genirq/affinity: Fix calculating vectors to assign
>
> The vectors_per_node is calculated from the remaining available vectors.
> The current vector starts after pre_vectors, so we need to subtract that
> from the current to properly account for the number of remaining vectors
> to assign.
>
> Fixes: 3412386b531 ("irq/affinity: Fix extra vecs calculation")
> Reported-by: Andrei Vagin <avagin@virtuozzo.com>
> Signed-off-by: Keith Busch <keith.busch@intel.com>
> Link: http://lkml.kernel.org/r/1492645870-13019-1-git-send-email-keith.busch@intel.com
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>
> ---
> kernel/irq/affinity.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
> index d052947..e2d356d 100644
> --- a/kernel/irq/affinity.c
> +++ b/kernel/irq/affinity.c
> @@ -98,7 +98,7 @@ irq_create_affinity_masks(int nvecs, const struct irq_affinity *affd)
> int ncpus, v, vecs_to_assign, vecs_per_node;
>
> /* Spread the vectors per node */
> - vecs_per_node = (affv - curvec) / nodes;
> + vecs_per_node = (affv - (curvec - affd->pre_vectors)) / nodes;
>
> /* Get the cpus on this node which are in the mask */
> cpumask_and(nmsk, cpu_online_mask, cpumask_of_node(n));
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-22 4:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-19 23:51 [PATCH] irq/affinity: Fix calculating vectors to assign Keith Busch
2017-04-20 14:06 ` [tip:irq/urgent] genirq/affinity: " tip-bot for Keith Busch
2017-04-22 4:37 ` Andrei Vagin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).