Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 May 2015 18:28:44 +0200
From:      =?UTF-8?B?Um9nZXIgUGF1IE1vbm7DqQ==?= <roger.pau@citrix.com>
To:        "Eggert, Lars" <lars@netapp.com>
Cc:        "freebsd-xen@freebsd.org" <freebsd-xen@freebsd.org>
Subject:   Re: Xen dom0 "interrupt storm detected on "irq16:"; throttling interrupt source"
Message-ID:  <55561EBC.8080901@citrix.com>
In-Reply-To: <91758942-3683-42E5-9B39-66775E48D4DF@netapp.com>
References:  <EAB58E00-BA0A-45FB-A709-01359219C106@netapp.com> <55531131.7040404@citrix.com> <65D7289A-9261-4F02-88E5-B2D137C268C1@netapp.com> <5553651D.3000400@citrix.com> <FFAA0565-3513-4097-A356-8BED9DB61307@netapp.com> <5555DFBC.9030306@citrix.com> <683335F9-E04E-4F8C-B1EF-0047E63E00AD@netapp.com> <5555FF4A.8010702@citrix.com> <126FDC37-2822-45DB-9AA6-3C9A03D89959@netapp.com> <55560414.1040002@citrix.com> <91758942-3683-42E5-9B39-66775E48D4DF@netapp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
El 15/05/15 a les 16.42, Eggert, Lars ha escrit:
> On 2015-5-15, at 16:35, Roger Pau Monné <roger.pau@citrix.com> wrote:
>>
>> Yes, but I've realized that isci for example passes an uint32_t instead
>> of an int, so it might be best to set it to 0.
> 
> Here is what I see now:
> 
> isci0: <Intel(R) C600 Series Chipset SAS Controller (SATA mode)> port 0x6000-0x60ff mem 0xde07c000-0xde07ffff,0xddc00000-0xddffffff irq 16 at device 0.0 on pci10
> isci0: attempting to allocate 2 MSI-X vectors (2 supported)
> ISCI: isci->num_interrupts: 2 max_msix_messages: 2
> isci: 1:000089 ISCI bus_alloc_resource failed
> 
> The storm is still there.

Yes, after looking at the code, isci really needs to check for the 
return value of pci_alloc_msix, because num_interrupts is not updated 
if the allocation fails. Following patch should hopefully fix it, 
please give it a try.

Roger.
---
diff --git a/sys/dev/isci/isci_interrupt.c b/sys/dev/isci/isci_interrupt.c
index 52c64f7..f331f3c 100644
--- a/sys/dev/isci/isci_interrupt.c
+++ b/sys/dev/isci/isci_interrupt.c
@@ -128,6 +128,7 @@ isci_interrupt_setup(struct isci_softc *isci)
 	    isci->controller_count;
 	BOOL use_msix = FALSE;
 	uint32_t force_legacy_interrupts = 0;
+	int rc;
 
 	TUNABLE_INT_FETCH("hw.isci.force_legacy_interrupts",
 	    &force_legacy_interrupts);
@@ -136,8 +137,8 @@ isci_interrupt_setup(struct isci_softc *isci)
 	    pci_msix_count(isci->device) >= max_msix_messages) {
 
 		isci->num_interrupts = max_msix_messages;
-		pci_alloc_msix(isci->device, &isci->num_interrupts);
-		if (isci->num_interrupts == max_msix_messages)
+		rc = pci_alloc_msix(isci->device, &isci->num_interrupts);
+		if (rc == 0 && isci->num_interrupts == max_msix_messages)
 			use_msix = TRUE;
 	}
 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?55561EBC.8080901>