From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>,
Matthew Wilcox <matthew@wil.cx>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"grundler@parisc-linux.org" <grundler@parisc-linux.org>,
"mingo@elte.hu" <mingo@elte.hu>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"jgarzik@pobox.com" <jgarzik@pobox.com>,
"linux-ide@vger.kernel.org" <linux-ide@vger.kernel.org>,
"jbarnes@virtuousgeek.org" <jbarnes@virtuousgeek.org>,
"rdunlap@xenotime.net" <rdunlap@xenotime.net>,
"mtk.manpages@gmail.com" <mtk.manpages@gmail.com>
Subject: Re: Multiple MSI, take 3
Date: Sat, 12 Jul 2008 17:36:01 +1000 [thread overview]
Message-ID: <1215848161.7549.166.camel@pasglop> (raw)
In-Reply-To: <m13amf3eak.fsf@frodo.ebiederm.org>
> It is edge triggered so it won't refire when unmasked (especially if we don't know).
> So it is easy to wind up in a state where the device is waiting for the software
> and the software is waiting for the device because an irq gets dropped.
Well, we are smarter than that. soft-masking is a know well-solved
problem. We just latch that something happened while masked and refire
when unmasked. Not terribly hard. We already do that in various
situations to mask edge interrupts.
> There are enough places that have problems that we have a fairly standard work around
> to the problem (listed above) by just taking the first irq (after we have disabled the
> irq) and setting it pending in software and then actually masking it in hardware.
Masking in HW is totally optional. I don't mask in HW on cell for
example, the HW just can't.
> That works, but it is still isn't quite correct. Because we can run the
> interrupt handler once to often.
We only re-fire if it actually occured while "masked", that should take
care that we never fire once too much, no ?
> For interrupts that are never shared and
> always in order with the DMA, generally don't require reading a status
> register on the card, and are otherwise highly optimized that might actually
> be a problem.
There must be some way of knowing what work is to do (ie, whether a DMA
q entry is completed, some kind of done bit, etc...). There generally is
at least, so that even in that case, spurrious MSIs are mostly a non
issue, but I don't think we have them here.
> Which is why I said that it doesn't look like even using an iommu can
> fix all of the issues with treating msi multi message mode messages
> as individual irqs. We can get very close but not quite there.
I still mostly dislike the new approach, I prefer Matthew's original one
with SW masking of the MSIs. For example, if you have the MSIs be 'one'
interrupt, then you hit all of the logic in the IRQ core to make sure
only one happens at once. Might not be what you want, and -will- cause
some to be dropped... not nice.
Ben.
next prev parent reply other threads:[~2008-07-12 7:36 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-11 0:57 Multiple MSI, take 3 Matthew Wilcox
2008-07-11 0:59 ` [PATCH] PCI MSI: Replace 'type' with 'is_msix' Matthew Wilcox
2008-07-11 0:59 ` [PATCH] PCI: Add support for multiple MSI Matthew Wilcox
2008-07-11 8:28 ` Hidetoshi Seto
2008-07-11 9:45 ` Matthew Wilcox
2008-07-12 3:45 ` Benjamin Herrenschmidt
2008-07-11 1:00 ` [PATCH] Rewrite MSI-HOWTO Matthew Wilcox
2008-09-26 6:42 ` Grant Grundler
2008-07-11 1:00 ` [PATCH] AHCI: Request multiple MSIs Matthew Wilcox
2008-07-11 1:00 ` [PATCH] x86-64: Support for " Matthew Wilcox
2008-07-11 4:50 ` Kenji Kaneshige
2008-07-11 8:50 ` Matthew Wilcox
2008-07-14 1:08 ` Kenji Kaneshige
2008-07-11 10:06 ` Multiple MSI, take 3 Eric W. Biederman
2008-07-11 10:23 ` Matthew Wilcox
2008-07-11 10:32 ` David Miller
2008-07-11 10:41 ` Matthew Wilcox
2008-07-11 11:05 ` Eric W. Biederman
2008-07-11 11:34 ` Eric W. Biederman
2008-07-11 12:17 ` Matthew Wilcox
2008-07-11 15:10 ` Matthew Wilcox
2008-07-11 21:59 ` Suresh Siddha
2008-07-11 22:59 ` Eric W. Biederman
2008-07-11 23:15 ` Suresh Siddha
2008-07-11 23:59 ` Eric W. Biederman
2008-07-12 3:52 ` Benjamin Herrenschmidt
2008-07-12 4:41 ` Eric W. Biederman
2008-07-12 7:36 ` Benjamin Herrenschmidt [this message]
2008-07-13 22:30 ` Eric W. Biederman
2008-07-13 22:44 ` Benjamin Herrenschmidt
2008-07-13 23:29 ` Eric W. Biederman
2008-07-14 0:17 ` Benjamin Herrenschmidt
2008-07-14 0:44 ` David Miller
2008-07-14 2:03 ` Eric W. Biederman
2008-07-14 3:19 ` David Miller
2008-09-26 5:30 ` Jike Song
2008-09-27 19:04 ` Matthew Wilcox
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=1215848161.7549.166.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=ebiederm@xmission.com \
--cc=grundler@parisc-linux.org \
--cc=jbarnes@virtuousgeek.org \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=mingo@elte.hu \
--cc=mtk.manpages@gmail.com \
--cc=rdunlap@xenotime.net \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
/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).