Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1516456 > unrolled thread

support for partial irq affinity assignment

Started byChristoph Hellwig <hch@lst.de>
First post2016-11-07 19:50 +0100
Last post2016-11-08 22:10 +0100
Articles 12 on this page of 32 — 5 participants

Back to article view | Back to linux.kernel


Contents

  support for partial irq affinity assignment Christoph Hellwig <hch@lst.de> - 2016-11-07 19:50 +0100
    [PATCH 1/7] genirq/affinity: Introduce struct irq_affinity Christoph Hellwig <hch@lst.de> - 2016-11-07 19:50 +0100
      Re: [PATCH 1/7] genirq/affinity: Introduce struct irq_affinity Johannes Thumshirn <jthumshirn@suse.de> - 2016-11-08 09:20 +0100
      Re: [PATCH 1/7] genirq/affinity: Introduce struct irq_affinity Hannes Reinecke <hare@suse.de> - 2016-11-08 09:20 +0100
      Re: [PATCH 1/7] genirq/affinity: Introduce struct irq_affinity Bjorn Helgaas <helgaas@kernel.org> - 2016-11-08 22:30 +0100
        Re: [PATCH 1/7] genirq/affinity: Introduce struct irq_affinity Christoph Hellwig <hch@lst.de> - 2016-11-08 23:40 +0100
    [PATCH 5/7] pci/msi: Provide pci_alloc_irq_vectors_affinity() Christoph Hellwig <hch@lst.de> - 2016-11-07 19:50 +0100
      Re: [PATCH 5/7] pci/msi: Provide pci_alloc_irq_vectors_affinity() Hannes Reinecke <hare@suse.de> - 2016-11-08 09:20 +0100
        Re: [PATCH 5/7] pci/msi: Provide pci_alloc_irq_vectors_affinity() Johannes Thumshirn <jthumshirn@suse.de> - 2016-11-08 09:30 +0100
      Re: [PATCH 5/7] pci/msi: Provide pci_alloc_irq_vectors_affinity() Bjorn Helgaas <helgaas@kernel.org> - 2016-11-08 22:20 +0100
        Re: [PATCH 5/7] pci/msi: Provide pci_alloc_irq_vectors_affinity() Christoph Hellwig <hch@lst.de> - 2016-11-08 22:30 +0100
    [PATCH 4/7] pci/msi: Propagate irq affinity description through the MSI code Christoph Hellwig <hch@lst.de> - 2016-11-07 19:50 +0100
      Re: [PATCH 4/7] pci/msi: Propagate irq affinity description through  the MSI code Hannes Reinecke <hare@suse.de> - 2016-11-08 09:20 +0100
      Re: [PATCH 4/7] pci/msi: Propagate irq affinity description through  the MSI code Johannes Thumshirn <jthumshirn@suse.de> - 2016-11-08 09:30 +0100
      Re: [PATCH 4/7] pci/msi: Propagate irq affinity description through  the MSI code Bjorn Helgaas <helgaas@kernel.org> - 2016-11-08 22:20 +0100
    [PATCH 7/7] blk-mq: add a first_vec argument to blk_mq_pci_map_queues Christoph Hellwig <hch@lst.de> - 2016-11-07 19:50 +0100
      Re: [PATCH 7/7] blk-mq: add a first_vec argument to  blk_mq_pci_map_queues Johannes Thumshirn <jthumshirn@suse.de> - 2016-11-08 09:30 +0100
    [PATCH 2/7] genirq/affinity: Handle pre/post vectors in irq_calc_affinity_vectors() Christoph Hellwig <hch@lst.de> - 2016-11-07 19:50 +0100
      Re: [PATCH 2/7] genirq/affinity: Handle pre/post vectors in  irq_calc_affinity_vectors() Hannes Reinecke <hare@suse.de> - 2016-11-08 09:20 +0100
        Re: [PATCH 2/7] genirq/affinity: Handle pre/post vectors in  irq_calc_affinity_vectors() Thomas Gleixner <tglx@linutronix.de> - 2016-11-08 15:50 +0100
    [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks() Christoph Hellwig <hch@lst.de> - 2016-11-07 19:50 +0100
      Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in  irq_create_affinity_masks() Hannes Reinecke <hare@suse.de> - 2016-11-08 09:20 +0100
        Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in         irq_create_affinity_masks() Christoph Hellwig <hch@lst.de> - 2016-11-08 16:00 +0100
          Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in  irq_create_affinity_masks() Hannes Reinecke <hare@suse.de> - 2016-11-08 16:00 +0100
            Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in         irq_create_affinity_masks() Christoph Hellwig <hch@lst.de> - 2016-11-08 16:10 +0100
              Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in         irq_create_affinity_masks() Christoph Hellwig <hch@lst.de> - 2016-11-08 17:40 +0100
              Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in  irq_create_affinity_masks() Thomas Gleixner <tglx@linutronix.de> - 2016-11-08 17:40 +0100
      Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in  irq_create_affinity_masks() Bjorn Helgaas <helgaas@kernel.org> - 2016-11-08 22:30 +0100
    [PATCH 6/7] pci: Remove the irq_affinity mask from struct pci_dev Christoph Hellwig <hch@lst.de> - 2016-11-07 20:00 +0100
      Re: [PATCH 6/7] pci: Remove the irq_affinity mask from struct pci_dev Hannes Reinecke <hare@suse.de> - 2016-11-08 09:20 +0100
      Re: [PATCH 6/7] pci: Remove the irq_affinity mask from struct pci_dev Johannes Thumshirn <jthumshirn@suse.de> - 2016-11-08 09:30 +0100
      Re: [PATCH 6/7] pci: Remove the irq_affinity mask from struct pci_dev Bjorn Helgaas <helgaas@kernel.org> - 2016-11-08 22:10 +0100

Page 2 of 2 — ← Prev page 1 [2]


#1516471 — [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()

FromChristoph Hellwig <hch@lst.de>
Date2016-11-07 19:50 +0100
Subject[PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()
Message-ID<sAX9w-71s-33@gated-at.bofh.it>
In reply to#1516456
From: Christogh Hellwig <hch@lst.de>

Only calculate the affinity for the main I/O vectors, and skip the
pre or post vectors specified by struct irq_affinity.

Also remove the irq_affinity cpumask argument that has never been used.
If we ever need it in the future we can pass it through struct
irq_affinity.

Signed-off-by: Christogh Hellwig <hch@lst.de>
---
 drivers/pci/msi.c         |  4 ++--
 include/linux/interrupt.h |  4 ++--
 kernel/irq/affinity.c     | 46 +++++++++++++++++++++++++---------------------
 3 files changed, 29 insertions(+), 25 deletions(-)

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index c58d3c2..1761b8a 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -558,7 +558,7 @@ msi_setup_entry(struct pci_dev *dev, int nvec, bool affinity)
 	u16 control;
 
 	if (affinity) {
-		masks = irq_create_affinity_masks(dev->irq_affinity, nvec);
+		masks = irq_create_affinity_masks(nvec, NULL);
 		if (!masks)
 			pr_err("Unable to allocate affinity masks, ignoring\n");
 	}
@@ -697,7 +697,7 @@ static int msix_setup_entries(struct pci_dev *dev, void __iomem *base,
 	int ret, i;
 
 	if (affinity) {
-		masks = irq_create_affinity_masks(dev->irq_affinity, nvec);
+		masks = irq_create_affinity_masks(nvec, NULL);
 		if (!masks)
 			pr_err("Unable to allocate affinity masks, ignoring\n");
 	}
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 092adfb..bca8f1c 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -290,7 +290,7 @@ extern int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m);
 extern int
 irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify);
 
-struct cpumask *irq_create_affinity_masks(const struct cpumask *affinity, int nvec);
+struct cpumask *irq_create_affinity_masks(int nvec, const struct irq_affinity *affd);
 int irq_calc_affinity_vectors(int maxvec, const struct irq_affinity *affd);
 
 #else /* CONFIG_SMP */
@@ -325,7 +325,7 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
 }
 
 static inline struct cpumask *
-irq_create_affinity_masks(const struct cpumask *affinity, int nvec)
+irq_create_affinity_masks(int nvec, const struct irq_affinity *affd)
 {
 	return NULL;
 }
diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
index 8d92597..17360bd 100644
--- a/kernel/irq/affinity.c
+++ b/kernel/irq/affinity.c
@@ -51,16 +51,16 @@ static int get_nodes_in_cpumask(const struct cpumask *mask, nodemask_t *nodemsk)
 
 /**
  * irq_create_affinity_masks - Create affinity masks for multiqueue spreading
- * @affinity:		The affinity mask to spread. If NULL cpu_online_mask
- *			is used
- * @nvecs:		The number of vectors
+ * @nvecs:	The total number of vectors
+ * @affd:	Description of the affinity requirements
  *
  * Returns the masks pointer or NULL if allocation failed.
  */
-struct cpumask *irq_create_affinity_masks(const struct cpumask *affinity,
-					  int nvec)
+struct cpumask *
+irq_create_affinity_masks(int nvecs, const struct irq_affinity *affd)
 {
-	int n, nodes, vecs_per_node, cpus_per_vec, extra_vecs, curvec = 0;
+	int n, nodes, vecs_per_node, cpus_per_vec, extra_vecs, curvec;
+	int affv = nvecs - affd->pre_vectors - affd->post_vectors;
 	nodemask_t nodemsk = NODE_MASK_NONE;
 	struct cpumask *masks;
 	cpumask_var_t nmsk;
@@ -68,46 +68,46 @@ struct cpumask *irq_create_affinity_masks(const struct cpumask *affinity,
 	if (!zalloc_cpumask_var(&nmsk, GFP_KERNEL))
 		return NULL;
 
-	masks = kzalloc(nvec * sizeof(*masks), GFP_KERNEL);
+	masks = kcalloc(nvecs, sizeof(*masks), GFP_KERNEL);
 	if (!masks)
 		goto out;
 
+	/* Fill out vectors at the beginning that don't need affinity */
+	for (curvec = 0; curvec < affd->pre_vectors; curvec++)
+		cpumask_copy(masks + curvec, cpu_possible_mask);
+
 	/* Stabilize the cpumasks */
 	get_online_cpus();
-	/* If the supplied affinity mask is NULL, use cpu online mask */
-	if (!affinity)
-		affinity = cpu_online_mask;
-
-	nodes = get_nodes_in_cpumask(affinity, &nodemsk);
+	nodes = get_nodes_in_cpumask(cpu_online_mask, &nodemsk);
 
 	/*
 	 * If the number of nodes in the mask is less than or equal the
 	 * number of vectors we just spread the vectors across the nodes.
 	 */
-	if (nvec <= nodes) {
+	if (affv <= nodes) {
 		for_each_node_mask(n, nodemsk) {
 			cpumask_copy(masks + curvec, cpumask_of_node(n));
-			if (++curvec == nvec)
+			if (++curvec == affv)
 				break;
 		}
-		goto outonl;
+		goto done;
 	}
 
 	/* Spread the vectors per node */
-	vecs_per_node = nvec / nodes;
+	vecs_per_node = affv / nodes;
 	/* Account for rounding errors */
-	extra_vecs = nvec - (nodes * vecs_per_node);
+	extra_vecs = affv - (nodes * vecs_per_node);
 
 	for_each_node_mask(n, nodemsk) {
 		int ncpus, v, vecs_to_assign = vecs_per_node;
 
 		/* Get the cpus on this node which are in the mask */
-		cpumask_and(nmsk, affinity, cpumask_of_node(n));
+		cpumask_and(nmsk, cpu_online_mask, cpumask_of_node(n));
 
 		/* Calculate the number of cpus per vector */
 		ncpus = cpumask_weight(nmsk);
 
-		for (v = 0; curvec < nvec && v < vecs_to_assign; curvec++, v++) {
+		for (v = 0; curvec < affv && v < vecs_to_assign; curvec++, v++) {
 			cpus_per_vec = ncpus / vecs_to_assign;
 
 			/* Account for extra vectors to compensate rounding errors */
@@ -119,12 +119,16 @@ struct cpumask *irq_create_affinity_masks(const struct cpumask *affinity,
 			irq_spread_init_one(masks + curvec, nmsk, cpus_per_vec);
 		}
 
-		if (curvec >= nvec)
+		if (curvec >= affv)
 			break;
 	}
 
-outonl:
+done:
 	put_online_cpus();
+
+	/* Fill out vectors at the end that don't need affinity */
+	for (; curvec < nvecs; curvec++)
+		cpumask_copy(masks + curvec, cpu_possible_mask);
 out:
 	free_cpumask_var(nmsk);
 	return masks;
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1516921 — Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()

FromHannes Reinecke <hare@suse.de>
Date2016-11-08 09:20 +0100
SubjectRe: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()
Message-ID<sB9Nn-6TK-7@gated-at.bofh.it>
In reply to#1516471
On 11/07/2016 07:47 PM, Christoph Hellwig wrote:
> From: Christogh Hellwig <hch@lst.de>
>
> Only calculate the affinity for the main I/O vectors, and skip the
> pre or post vectors specified by struct irq_affinity.
>
> Also remove the irq_affinity cpumask argument that has never been used.
> If we ever need it in the future we can pass it through struct
> irq_affinity.
>
> Signed-off-by: Christogh Hellwig <hch@lst.de>
> ---
>  drivers/pci/msi.c         |  4 ++--
>  include/linux/interrupt.h |  4 ++--
>  kernel/irq/affinity.c     | 46 +++++++++++++++++++++++++---------------------
>  3 files changed, 29 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index c58d3c2..1761b8a 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -558,7 +558,7 @@ msi_setup_entry(struct pci_dev *dev, int nvec, bool affinity)
>  	u16 control;
>
>  	if (affinity) {
> -		masks = irq_create_affinity_masks(dev->irq_affinity, nvec);
> +		masks = irq_create_affinity_masks(nvec, NULL);
>  		if (!masks)
>  			pr_err("Unable to allocate affinity masks, ignoring\n");
>  	}
> @@ -697,7 +697,7 @@ static int msix_setup_entries(struct pci_dev *dev, void __iomem *base,
>  	int ret, i;
>
>  	if (affinity) {
> -		masks = irq_create_affinity_masks(dev->irq_affinity, nvec);
> +		masks = irq_create_affinity_masks(nvec, NULL);
>  		if (!masks)
>  			pr_err("Unable to allocate affinity masks, ignoring\n");
>  	}
> diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
> index 092adfb..bca8f1c 100644
> --- a/include/linux/interrupt.h
> +++ b/include/linux/interrupt.h
> @@ -290,7 +290,7 @@ extern int irq_set_affinity_hint(unsigned int irq, const struct cpumask *m);
>  extern int
>  irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify);
>
> -struct cpumask *irq_create_affinity_masks(const struct cpumask *affinity, int nvec);
> +struct cpumask *irq_create_affinity_masks(int nvec, const struct irq_affinity *affd);
>  int irq_calc_affinity_vectors(int maxvec, const struct irq_affinity *affd);
>
>  #else /* CONFIG_SMP */
> @@ -325,7 +325,7 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)
>  }
>
>  static inline struct cpumask *
> -irq_create_affinity_masks(const struct cpumask *affinity, int nvec)
> +irq_create_affinity_masks(int nvec, const struct irq_affinity *affd)
>  {
>  	return NULL;
>  }
> diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
> index 8d92597..17360bd 100644
> --- a/kernel/irq/affinity.c
> +++ b/kernel/irq/affinity.c
> @@ -51,16 +51,16 @@ static int get_nodes_in_cpumask(const struct cpumask *mask, nodemask_t *nodemsk)
>
>  /**
>   * irq_create_affinity_masks - Create affinity masks for multiqueue spreading
> - * @affinity:		The affinity mask to spread. If NULL cpu_online_mask
> - *			is used
> - * @nvecs:		The number of vectors
> + * @nvecs:	The total number of vectors
> + * @affd:	Description of the affinity requirements
>   *
>   * Returns the masks pointer or NULL if allocation failed.
>   */
> -struct cpumask *irq_create_affinity_masks(const struct cpumask *affinity,
> -					  int nvec)
> +struct cpumask *
> +irq_create_affinity_masks(int nvecs, const struct irq_affinity *affd)
>  {
> -	int n, nodes, vecs_per_node, cpus_per_vec, extra_vecs, curvec = 0;
> +	int n, nodes, vecs_per_node, cpus_per_vec, extra_vecs, curvec;
> +	int affv = nvecs - affd->pre_vectors - affd->post_vectors;
>  	nodemask_t nodemsk = NODE_MASK_NONE;
>  	struct cpumask *masks;
>  	cpumask_var_t nmsk;
Check for NULL affd?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

[toc] | [prev] | [next] | [standalone]


#1517254 — Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()

FromChristoph Hellwig <hch@lst.de>
Date2016-11-08 16:00 +0100
SubjectRe: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()
Message-ID<sBg2u-2e5-13@gated-at.bofh.it>
In reply to#1516921
[please trim the f***king context in your replies, thanks..]

On Tue, Nov 08, 2016 at 09:15:27AM +0100, Hannes Reinecke wrote:
>> +irq_create_affinity_masks(int nvecs, const struct irq_affinity *affd)
>>  {
>> -	int n, nodes, vecs_per_node, cpus_per_vec, extra_vecs, curvec = 0;
>> +	int n, nodes, vecs_per_node, cpus_per_vec, extra_vecs, curvec;
>> +	int affv = nvecs - affd->pre_vectors - affd->post_vectors;
>>  	nodemask_t nodemsk = NODE_MASK_NONE;
>>  	struct cpumask *masks;
>>  	cpumask_var_t nmsk;
> Check for NULL affd?

We expect all callers to pass a valid one.

[toc] | [prev] | [next] | [standalone]


#1517261 — Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()

FromHannes Reinecke <hare@suse.de>
Date2016-11-08 16:00 +0100
SubjectRe: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()
Message-ID<sBg2u-2e5-25@gated-at.bofh.it>
In reply to#1517254
On 11/08/2016 03:55 PM, Christoph Hellwig wrote:
> [please trim the f***king context in your replies, thanks..]
>
> On Tue, Nov 08, 2016 at 09:15:27AM +0100, Hannes Reinecke wrote:
>>> +irq_create_affinity_masks(int nvecs, const struct irq_affinity *affd)
>>>  {
>>> -	int n, nodes, vecs_per_node, cpus_per_vec, extra_vecs, curvec = 0;
>>> +	int n, nodes, vecs_per_node, cpus_per_vec, extra_vecs, curvec;
>>> +	int affv = nvecs - affd->pre_vectors - affd->post_vectors;
>>>  	nodemask_t nodemsk = NODE_MASK_NONE;
>>>  	struct cpumask *masks;
>>>  	cpumask_var_t nmsk;
>> Check for NULL affd?
>
> We expect all callers to pass a valid one.

Which you don't in this patch:

@@ -697,7 +697,7 @@ static int msix_setup_entries(struct pci_dev *dev, 
void __iomem *base,
      int ret, i;

      if (affinity) {
-        masks = irq_create_affinity_masks(dev->irq_affinity, nvec);
+        masks = irq_create_affinity_masks(nvec, NULL);
          if (!masks)
              pr_err("Unable to allocate affinity masks, ignoring\n");
      }

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

[toc] | [prev] | [next] | [standalone]


#1517275 — Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()

FromChristoph Hellwig <hch@lst.de>
Date2016-11-08 16:10 +0100
SubjectRe: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()
Message-ID<sBgc9-2wv-19@gated-at.bofh.it>
In reply to#1517261
On Tue, Nov 08, 2016 at 03:59:16PM +0100, Hannes Reinecke wrote:
>
> Which you don't in this patch:

True.  We will always in the end, but the split isn't right, we'll
need to pass the non-NULL argument starting in this patch.

[toc] | [prev] | [next] | [standalone]


#1517360 — Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()

FromChristoph Hellwig <hch@lst.de>
Date2016-11-08 17:40 +0100
SubjectRe: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()
Message-ID<sBhBg-3jW-11@gated-at.bofh.it>
In reply to#1517275
On Tue, Nov 08, 2016 at 05:27:52PM +0100, Thomas Gleixner wrote:
> On Tue, 8 Nov 2016, Christoph Hellwig wrote:
> 
> > On Tue, Nov 08, 2016 at 03:59:16PM +0100, Hannes Reinecke wrote:
> > >
> > > Which you don't in this patch:
> > 
> > True.  We will always in the end, but the split isn't right, we'll
> > need to pass the non-NULL argument starting in this patch.
> 
> No, in the previous one ....

That too, but it's for different functions.  I have a rebased version
that does this, I'll run it through quick testing and will repost
it later today.

[toc] | [prev] | [next] | [standalone]


#1517370 — Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()

FromThomas Gleixner <tglx@linutronix.de>
Date2016-11-08 17:40 +0100
SubjectRe: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()
Message-ID<sBhBg-3jW-13@gated-at.bofh.it>
In reply to#1517275
On Tue, 8 Nov 2016, Christoph Hellwig wrote:

> On Tue, Nov 08, 2016 at 03:59:16PM +0100, Hannes Reinecke wrote:
> >
> > Which you don't in this patch:
> 
> True.  We will always in the end, but the split isn't right, we'll
> need to pass the non-NULL argument starting in this patch.

No, in the previous one ....
 

[toc] | [prev] | [next] | [standalone]


#1517592 — Re: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()

FromBjorn Helgaas <helgaas@kernel.org>
Date2016-11-08 22:30 +0100
SubjectRe: [PATCH 3/7] genirq/affinity: Handle pre/post vectors in irq_create_affinity_masks()
Message-ID<sBm7T-6sU-3@gated-at.bofh.it>
In reply to#1516471
On Mon, Nov 07, 2016 at 10:47:38AM -0800, Christoph Hellwig wrote:
> From: Christogh Hellwig <hch@lst.de>
> 
> Only calculate the affinity for the main I/O vectors, and skip the
> pre or post vectors specified by struct irq_affinity.
> 
> Also remove the irq_affinity cpumask argument that has never been used.
> If we ever need it in the future we can pass it through struct
> irq_affinity.
> 
> Signed-off-by: Christogh Hellwig <hch@lst.de>

s/Christogh/Christoph/ (also above, and maybe other patches too?)

Acked-by: Bjorn Helgaas <bhelgaas@google.com>

> ---
>  drivers/pci/msi.c         |  4 ++--
>  include/linux/interrupt.h |  4 ++--
>  kernel/irq/affinity.c     | 46 +++++++++++++++++++++++++---------------------
>  3 files changed, 29 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
> index c58d3c2..1761b8a 100644
> --- a/drivers/pci/msi.c
> +++ b/drivers/pci/msi.c
> @@ -558,7 +558,7 @@ msi_setup_entry(struct pci_dev *dev, int nvec, bool affinity)
>  	u16 control;
>  
>  	if (affinity) {
> -		masks = irq_create_affinity_masks(dev->irq_affinity, nvec);
> +		masks = irq_create_affinity_masks(nvec, NULL);
>  		if (!masks)
>  			pr_err("Unable to allocate affinity masks, ignoring\n");
>  	}
> @@ -697,7 +697,7 @@ static int msix_setup_entries(struct pci_dev *dev, void __iomem *base,
>  	int ret, i;
>  
>  	if (affinity) {
> -		masks = irq_create_affinity_masks(dev->irq_affinity, nvec);
> +		masks = irq_create_affinity_masks(nvec, NULL);
>  		if (!masks)
>  			pr_err("Unable to allocate affinity masks, ignoring\n");

Not caused by this patch, but can we use dev_err() here and above?

[toc] | [prev] | [next] | [standalone]


#1516485 — [PATCH 6/7] pci: Remove the irq_affinity mask from struct pci_dev

FromChristoph Hellwig <hch@lst.de>
Date2016-11-07 20:00 +0100
Subject[PATCH 6/7] pci: Remove the irq_affinity mask from struct pci_dev
Message-ID<sAXjd-74X-45@gated-at.bofh.it>
In reply to#1516456
This has never been used, and now is totally unreferenced.  Nuke it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/linux/pci.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 7090f5f..f2ba6ac 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -333,7 +333,6 @@ struct pci_dev {
 	 * directly, use the values stored here. They might be different!
 	 */
 	unsigned int	irq;
-	struct cpumask	*irq_affinity;
 	struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */
 
 	bool match_driver;		/* Skip attaching driver */
-- 
2.1.4

[toc] | [prev] | [next] | [standalone]


#1516920 — Re: [PATCH 6/7] pci: Remove the irq_affinity mask from struct pci_dev

FromHannes Reinecke <hare@suse.de>
Date2016-11-08 09:20 +0100
SubjectRe: [PATCH 6/7] pci: Remove the irq_affinity mask from struct pci_dev
Message-ID<sB9Nn-6TK-11@gated-at.bofh.it>
In reply to#1516485
On 11/07/2016 07:47 PM, Christoph Hellwig wrote:
> This has never been used, and now is totally unreferenced.  Nuke it.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  include/linux/pci.h | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 7090f5f..f2ba6ac 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -333,7 +333,6 @@ struct pci_dev {
>  	 * directly, use the values stored here. They might be different!
>  	 */
>  	unsigned int	irq;
> -	struct cpumask	*irq_affinity;
>  	struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */
>
>  	bool match_driver;		/* Skip attaching driver */
>
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)

[toc] | [prev] | [next] | [standalone]


#1516927 — Re: [PATCH 6/7] pci: Remove the irq_affinity mask from struct pci_dev

FromJohannes Thumshirn <jthumshirn@suse.de>
Date2016-11-08 09:30 +0100
SubjectRe: [PATCH 6/7] pci: Remove the irq_affinity mask from struct pci_dev
Message-ID<sB9X3-6WX-9@gated-at.bofh.it>
In reply to#1516485
On Mon, Nov 07, 2016 at 10:47:41AM -0800, Christoph Hellwig wrote:
> This has never been used, and now is totally unreferenced.  Nuke it.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---

Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

[toc] | [prev] | [next] | [standalone]


#1517584 — Re: [PATCH 6/7] pci: Remove the irq_affinity mask from struct pci_dev

FromBjorn Helgaas <helgaas@kernel.org>
Date2016-11-08 22:10 +0100
SubjectRe: [PATCH 6/7] pci: Remove the irq_affinity mask from struct pci_dev
Message-ID<sBlOx-6l2-15@gated-at.bofh.it>
In reply to#1516485
s/pci/PCI/ (in subject)

On Mon, Nov 07, 2016 at 10:47:41AM -0800, Christoph Hellwig wrote:
> This has never been used, and now is totally unreferenced.  Nuke it.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Acked-by: Bjorn Helgaas <bhelgaas@google.com>

> ---
>  include/linux/pci.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 7090f5f..f2ba6ac 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -333,7 +333,6 @@ struct pci_dev {
>  	 * directly, use the values stored here. They might be different!
>  	 */
>  	unsigned int	irq;
> -	struct cpumask	*irq_affinity;
>  	struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */
>  
>  	bool match_driver;		/* Skip attaching driver */
> -- 
> 2.1.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | linux.kernel


csiph-web