Re: pci_enable_msi() for everyone?

From: Greg KH
Date: Mon Jun 06 2005 - 19:04:23 EST


On Mon, Jun 06, 2005 at 07:53:55PM -0400, Jeff Garzik wrote:
> Greg KH wrote:
> >On Mon, Jun 06, 2005 at 07:08:33PM -0400, Jeff Garzik wrote:
> >
> >>Greg KH wrote:
> >>
> >>>Why would it matter? The driver shouldn't care if the interrupts come
> >>>in via the standard interrupt way, or through MSI, right? And if it
> >>
> >>It matters.
> >>
> >>Not only the differences DaveM mentioned, but also simply that you may
> >>assume your interrupt is not shared with anyone else.
> >
> >
> >Ok, and again, how would the call, pci_in_msi_mode(struct pci_dev *dev)
> >not allow for the driver to determine this?
>
> Let me see if I understand this correctly :)
>
> A technology (MSI) allows one to more efficiently call interrupt
> handlers, with fewer bus reads... and you want to add a test to each
> interrupt handler -- a test which adds several bus reads to the hot path
> of every MSI driver?

hell no.

> We want to -decrease- the overhead involved with an interrupt, but
> pci_in_msi_mode() increases it.

No, just call pci_in_msi_mode() where you were previously calling
pci_enable_msi() to test to see if we are in msi mode.

Patches in a bit to hopefully better show what I am talking about...

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/