Most interrupts are edge-triggered, non-APIC system
Hi,
João Oliveirinha reported a bug related to the sky2 network driver on the Gentoo bugzilla. Stephen Hemminger (sky2 author) kindly helped diagnose the issues, and he believes that one of the reasons why things are running sub-optimally is because the interrupt assigned to sky2 is edge-triggered (NAPI requires things to be level-triggered).
The system is a bit odd in that even on the latest BIOS, APIC support is apparently completely non-functional (or maybe just non-existent?). Even when the "lapic" parameter is used, ACPI appears to be used exclusively for interrupt routing.
This is a Toshiba M40-298 laptop.
Here is the interrupts map:
CPU0
0: 47094 XT-PIC timer 1: 541 XT-PIC i8042 2: 0 XT-PIC cascade 9: 13 XT-PIC acpi 10: 5548 XT-PIC ehci_hcd:usb1, uhci_hcd:usb2, Intel ICH6 11: 27 XT-PIC uhci_hcd:usb3, uhci_hcd:usb4, uhci_hcd:usb5, yenta, sdhci:slot0, sdhci:slot1, sdhci:slot2, ohci1394, sky2 12: 618 XT-PIC i8042 14: 7384 XT-PIC libata 15: 1275 XT-PIC libata NMI: 0 LOC: 0 ERR: 0 MIS: 0
And the ELCR register:
ACPI: setting ELCR to 0200 (from 0c20)
0200 suggests that IRQ 9 is the only level-triggered interrupt. Also, the interrupts are heavily shared, I'm not sure if this is another reason for concern...
Anyway, I'm not too familiar with ACPI or interrupt routing, so: do you regard it as a bug that so many interrupts are level-triggered?
If so, we can get it filed at the kernel bugzilla if appropriate.
Here is some info that might be useful:
dmesg dump with ACPI debugging enabled:
http://bugs.gentoo.org/attachment.cgi?id=85619&action=view
dmesg with the lapic parameter used at boot:
https://bugs.gentoo.org/attachment.cgi?id=85540&action=view
acpidump:
https://bugs.gentoo.org/attachment.cgi?id=85685&action=view
The actual bug report:
http://bugs.gentoo.org/show_bug.cgi?id=131274
Thanks,
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Daniel Drake
João Oliveirinha reported a bug related to the sky2 network driver on the Gentoo bugzilla. Stephen Hemminger (sky2 author) kindly helped diagnose the issues, and he believes that one of the reasons why things are running sub-optimally is because the interrupt assigned to sky2 is edge-triggered (NAPI requires things to be level-triggered).
I'm not convinced that the sky2 interrupt is edge-triggered.
The "ELCR" line:
ACPI: setting ELCR to 0200 (from 0c20)
only shows the ELCR state early during boot when we're setting up the ACPI SCI interrupt.
Interrupts can also be set to level-triggered mode later, when the driver claims the device. This in the acpi_register_gsi() -> eisa_set_level_irq() path and prints a different message.
Attachment http://bugs.gentoo.org/attachment.cgi?id=85619&action=view
shows that sky2 should be on IRQ11, and it should be level-triggered:
ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11
PCI: setting IRQ 11 as level-triggered
ACPI: PCI Interrupt 0000:00:01.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
...
ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
PCI: Setting latency timer of device 0000:02:00.0 to 64
sky2 v0.15 addr 0xbc000000 irq 11 Yukon-FE (0xb7) rev 1
(sky2 shares the interrupt with other devices, so we set IRQ 11 to be level-triggered when we enable the interrupt for one of the other devices, so the "setting IRQ 11 as level-triggered" message is earlier than the sky2 driver init.)
Bjorn
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Bjorn Helgaas
Quoted 1 line · Daniel Drake
João Oliveirinha reported a bug related to the sky2 network driver on the Gentoo bugzilla. Stephen Hemminger (sky2 author) kindly helped diagnose the issues, and he believes that one of the reasons why things are running sub-optimally is because the interrupt assigned to sky2 is edge-triggered (NAPI requires things to be level-triggered).
I'm not convinced that the sky2 interrupt is edge-triggered.
Thanks for the explanation, that makes sense. Stephen, you might be interested in this: (don't worry, nothing is broken!)
Quoted 20 lines
The "ELCR" line:
ACPI: setting ELCR to 0200 (from 0c20)
only shows the ELCR state early during boot when we're setting up the ACPI SCI interrupt.Interrupts can also be set to level-triggered mode later, when the driver claims the device. This in the
acpi_register_gsi()->eisa_set_level_irq()path and prints a different message.Attachment http://bugs.gentoo.org/attachment.cgi?id=85619&action=view
shows that sky2 should be on IRQ11, and it should be level-triggered:ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11
PCI: setting IRQ 11 as level-triggered
ACPI: PCI Interrupt 0000:00:01.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
...
ACPI: PCI Interrupt 0000:02:00.0[A] -> Link [LNKA] -> GSI 11 (level, low) -> IRQ 11
PCI: Setting latency timer of device 0000:02:00.0 to 64
sky2 v0.15 addr0xbc000000irq 11 Yukon-FE (0xb7) rev 1
Quoted 4 lines
(sky2 shares the interrupt with other devices, so we set IRQ 11 to be level-triggered when we enable the interrupt for one of the other devices, so the "setting IRQ 11 as level-triggered" message is earlier than the sky2 driver init.)
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html