From: "Yinghai Lu" <yhlu.kernel@gmail.com>
To: "Jeff Garzik" <jgarzik@pobox.com>
Cc: "Manfred Spraul" <manfred@colorfullife.com>,
"Ayaz Abdulla" <aabdulla@nvidia.com>,
nedev <netdev@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
"David Miller" <davem@davemloft.net>,
"Andrew Morton" <akpm@linux-foundation.org>
Subject: Re: MSI interrupts and disable_irq
Date: Tue, 16 Oct 2007 11:01:35 -0700 [thread overview]
Message-ID: <86802c440710161101o34a1b982w95c7473f0ec744ed@mail.gmail.com> (raw)
In-Reply-To: <4714F736.5000302@pobox.com>
On 10/16/07, Jeff Garzik <jgarzik@pobox.com> wrote:
> Yinghai Lu wrote:
> > On 10/15/07, Jeff Garzik <jgarzik@pobox.com> wrote:
> >> Manfred Spraul wrote:
> >>> Jeff Garzik wrote:
> >>>> I think the scenario you outline is an illustration of the approach's
> >>>> fragility: disable_irq() is a heavy hammer that originated with INTx,
> >>>> and it relies on a chip-specific disable method (kernel/irq/manage.c)
> >>>> that practically guarantees behavior will vary across MSI/INTx/etc.
> >>>>
> >>> I checked the code: IRQ_DISABLE is implemented in software, i.e.
> >>> handle_level_irq() only calls handle_IRQ_event() [and then the nic irq
> >>> handler] if IRQ_DISABLE is not set.
> >>> OTHO: The last trace looks as if nv_do_nic_poll() is interrupted by an irq.
> >>>
> >>> Perhaps something corrupts dev->irq? The irq is requested with
> >>> request_irq(np->pci_dev->irq, handler, IRQF_SHARED, dev->name, dev)
> >>> and disabled with
> >>> disable_irq_lockdep(dev->irq);
> >>>
> >>> Someone around with a MSI capable board? The forcedeth driver does
> >>> dev->irq = pci_dev->irq
> >>> in nv_probe(), especially before pci_enable_msi().
> >>> Does pci_enable_msi() change pci_dev->irq? Then we would disable the
> >>> wrong interrupt....
> >> Remember, fundamentally MSI-X is a one-to-many relationship, when you
> >> consider a single PCI device might have multiple vectors.
> >
> > msi-x is using other entry
> >
> > if (np->msi_flags & NV_MSI_X_ENABLED)
> >
> > enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector);
>
> Correct, but the overall point was that MSI-X conceptually conflicts
> with the existing "lockless" disable_irq() schedule, which was written
> when there was a one-one relationship between irq, PCI device, and work
> to be done.
at this point, nic in mcp55 is using msi or INTx.
YH
next prev parent reply other threads:[~2007-10-16 18:01 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-27 20:42 MSI interrupts and disable_irq Ayaz Abdulla
2007-09-29 2:47 ` Jeff Garzik
2007-09-29 3:08 ` Stephen Hemminger
2007-10-05 22:12 ` Eric W. Biederman
2007-10-06 6:23 ` Yinghai Lu
2007-10-06 17:43 ` Yinghai Lu
2007-10-06 17:59 ` Jeff Garzik
2007-10-07 16:54 ` Manfred Spraul
2007-10-13 9:30 ` Manfred Spraul
2007-10-14 5:59 ` Yinghai Lu
2007-10-14 7:15 ` Manfred Spraul
2007-10-14 19:55 ` Yinghai Lu
2007-10-14 21:47 ` Benjamin Herrenschmidt
2007-10-14 23:15 ` Yinghai Lu
2007-10-14 23:36 ` Benjamin Herrenschmidt
2007-10-15 22:17 ` Jeff Garzik
2007-10-16 17:23 ` Yinghai Lu
2007-10-16 17:39 ` Jeff Garzik
2007-10-16 17:59 ` Yinghai Lu
2007-10-16 19:44 ` Jeff Garzik
2007-10-16 18:01 ` Yinghai Lu [this message]
2007-10-17 19:43 ` Manfred Spraul
2007-10-02 19:03 ` Manfred Spraul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86802c440710161101o34a1b982w95c7473f0ec744ed@mail.gmail.com \
--to=yhlu.kernel@gmail.com \
--cc=aabdulla@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).