All of lore.kernel.org
 help / color / mirror / Atom feed
* Is there a way to change irq numbers of pcie cards ?
@ 2010-06-02 12:08 Bert dd
  2010-06-02 19:19 ` Bjorn Helgaas
  2010-06-02 23:13 ` Robert Hancock
  0 siblings, 2 replies; 4+ messages in thread
From: Bert dd @ 2010-06-02 12:08 UTC (permalink / raw)
  To: linux-kernel

Hi,
Is there a way to change irq numbers of pcie cards ?

I have a supermicro machine with 2 raid cards (lsi 9260-8i and lsi 9260-8e) and
one nvidia GTX480 graphics card.
The problem is that all these pcie cards are assigned the same irq number,
and thus all the interrupts are routed to the same cpu which can not
handle this.
If I replace the nvidia GTX480 with an older graphics card(too old for
our purposes (GTX295)), the graphics card gets a different irq number
than the raid cards, the interrups of the graphics card are handled by
a different cpu than those of the raid cards, and the read/write speed
of the raid increases.
I am reading/writing at 2.5 GB/s to the raid and I am uploading
textures at 0.5 GB/s to the graphics hardware.
Is there a way to change the irq numbers of the pcie cards ?
I am using IOAPIC for interrupt routing.
I am using ubuntu - kernel version 2.6.31-14-generic.

thanks,
  Bert De Decker
  bert.dedecker@uhasselt.be

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is there a way to change irq numbers of pcie cards ?
  2010-06-02 12:08 Is there a way to change irq numbers of pcie cards ? Bert dd
@ 2010-06-02 19:19 ` Bjorn Helgaas
  2010-06-02 23:13 ` Robert Hancock
  1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2010-06-02 19:19 UTC (permalink / raw)
  To: Bert dd; +Cc: linux-kernel, linux-pci

[I added linux-pci, where more PCI-savvy people will see it.]

On Wednesday, June 02, 2010 06:08:33 am Bert dd wrote:
> Hi,
> Is there a way to change irq numbers of pcie cards ?
> 
> I have a supermicro machine with 2 raid cards (lsi 9260-8i and lsi 9260-8e) and
> one nvidia GTX480 graphics card.
> The problem is that all these pcie cards are assigned the same irq number,
> and thus all the interrupts are routed to the same cpu which can not
> handle this.
> If I replace the nvidia GTX480 with an older graphics card(too old for
> our purposes (GTX295)), the graphics card gets a different irq number
> than the raid cards, the interrups of the graphics card are handled by
> a different cpu than those of the raid cards, and the read/write speed
> of the raid increases.
> I am reading/writing at 2.5 GB/s to the raid and I am uploading
> textures at 0.5 GB/s to the graphics hardware.
> Is there a way to change the irq numbers of the pcie cards ?
> I am using IOAPIC for interrupt routing.

I would think performance-oriented PCIe devices would be using
some sort of MSI, but I'm not really an expert in that area.

Can you post your /proc/interrupts and complete dmesg log in
case nobody jumps in with an obvious answer?

Bjorn

> I am using ubuntu - kernel version 2.6.31-14-generic.
> 
> thanks,
>   Bert De Decker
>   bert.dedecker@uhasselt.be

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is there a way to change irq numbers of pcie cards ?
  2010-06-02 12:08 Is there a way to change irq numbers of pcie cards ? Bert dd
  2010-06-02 19:19 ` Bjorn Helgaas
@ 2010-06-02 23:13 ` Robert Hancock
  2010-06-03  7:43   ` Clemens Ladisch
  1 sibling, 1 reply; 4+ messages in thread
From: Robert Hancock @ 2010-06-02 23:13 UTC (permalink / raw)
  To: Bert dd; +Cc: linux-kernel

On 06/02/2010 06:08 AM, Bert dd wrote:
> Hi,
> Is there a way to change irq numbers of pcie cards ?
>
> I have a supermicro machine with 2 raid cards (lsi 9260-8i and lsi 9260-8e) and
> one nvidia GTX480 graphics card.
> The problem is that all these pcie cards are assigned the same irq number,
> and thus all the interrupts are routed to the same cpu which can not
> handle this.
> If I replace the nvidia GTX480 with an older graphics card(too old for
> our purposes (GTX295)), the graphics card gets a different irq number
> than the raid cards, the interrups of the graphics card are handled by
> a different cpu than those of the raid cards, and the read/write speed
> of the raid increases.
> I am reading/writing at 2.5 GB/s to the raid and I am uploading
> textures at 0.5 GB/s to the graphics hardware.
> Is there a way to change the irq numbers of the pcie cards ?
> I am using IOAPIC for interrupt routing.
> I am using ubuntu - kernel version 2.6.31-14-generic.

In general there's no way to change what interrupts get allocated to 
what slots, unless the BIOS has a setting somewhere to change it.

If you can get MSI enabled for some of those cards, though, that should 
prevent them from sharing interrupts. What driver are you using for the 
nvidia cards? You can turn on MSI on the binary nvidia driver with the 
NVreg_EnableMSI=1 module parameter..

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is there a way to change irq numbers of pcie cards ?
  2010-06-02 23:13 ` Robert Hancock
@ 2010-06-03  7:43   ` Clemens Ladisch
  0 siblings, 0 replies; 4+ messages in thread
From: Clemens Ladisch @ 2010-06-03  7:43 UTC (permalink / raw)
  To: Robert Hancock; +Cc: Bert dd, linux-kernel

Robert Hancock wrote:
> On 06/02/2010 06:08 AM, Bert dd wrote:
> > I have a supermicro machine with 2 raid cards (lsi 9260-8i and lsi 9260-8e) and
> > one nvidia GTX480 graphics card.
> > The problem is that all these pcie cards are assigned the same irq number,
> 
> If you can get MSI enabled for some of those cards, though, that should
> prevent them from sharing interrupts.

The PCIe spec says that all PCIe devices must support MSI interrupts.
(Whether they do in practice is another question ...)

Regardless of the graphics card, enabling MSI for the RAID cards will
prevent their interrupts from interfering with each other.
Bert, you might want to try this completely untested patch:


--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -3169,6 +3169,8 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	if (megasas_init_mfi(instance))
 		goto fail_init_mfi;
 
+	pci_enable_msi(pdev);
+
 	/*
 	 * Register IRQ
 	 */
@@ -3218,6 +3220,7 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
 	pci_set_drvdata(pdev, NULL);
 	instance->instancet->disable_intr(instance->reg_set);
 	free_irq(instance->pdev->irq, instance);
+	pci_disable_msi(pdev);
 
 	megasas_release_mfi(instance);
 
@@ -3354,6 +3357,7 @@ megasas_suspend(struct pci_dev *pdev, pm_message_t state)
 	pci_set_drvdata(instance->pdev, instance);
 	instance->instancet->disable_intr(instance->reg_set);
 	free_irq(instance->pdev->irq, instance);
+	pci_disable_msi(pdev);
 
 	pci_save_state(pdev);
 	pci_disable_device(pdev);
@@ -3416,6 +3420,8 @@ megasas_resume(struct pci_dev *pdev)
 	tasklet_init(&instance->isr_tasklet, megasas_complete_cmd_dpc,
 			(unsigned long)instance);
 
+	pci_enable_msi(pdev);
+
 	/*
 	 * Register IRQ
 	 */
@@ -3519,6 +3525,7 @@ static void __devexit megasas_detach_one(struct pci_dev *pdev)
 	instance->instancet->disable_intr(instance->reg_set);
 
 	free_irq(instance->pdev->irq, instance);
+	pci_disable_msi(pdev);
 
 	megasas_release_mfi(instance);
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-03  7:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-02 12:08 Is there a way to change irq numbers of pcie cards ? Bert dd
2010-06-02 19:19 ` Bjorn Helgaas
2010-06-02 23:13 ` Robert Hancock
2010-06-03  7:43   ` Clemens Ladisch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.