public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Loic Prylli <loic@myri.com>
Cc: linux-pci@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org
Subject: Re: mask/unmasking while servicing MSI(-X) unnecessary?
Date: Thu, 30 Nov 2006 21:41:03 -0800	[thread overview]
Message-ID: <20061130214103.7ed090e9.akpm@osdl.org> (raw)
In-Reply-To: <456E0DAF.90507@myri.com>

On Wed, 29 Nov 2006 17:46:07 -0500
Loic Prylli <loic@myri.com> wrote:

> While looking into using MSI-X for our myri10ge driver, we have seen
> that the msi(x) code (driver/pci/msi.c) masks the MSI(-X) vector while
> servicing an interrupt. We are not sure why this masking is needed (for
> instance no such thing is done for "edge IOAPIC" interrupts). There
> seems to be already several mechanisms each individually protecting
> against "loosing an interrupt" without masking:
> - the "x86" architecture is able to queue 2 interrupt messages. That
> guarantees an interrupt handler will always start after the last MSI
> received (even in the case of a big burst of MSI messages).
> - Even if there wasn't that interrupt queuing, ack_APIC_irq() could be
> moved in the ack() method. Then things would work without masking even
> on a hypothetical platform where a new interrupt is completely ignored
> (with no IRR-like register) while servicing the same vector (anyway
> since this "msi" code is already tied to "x86" architecture
> specificities, that hypothetical platform might not be relevant).
> - Almost every driver/device have their own way of acknowledging
> interrupts anyway, which also by itself makes the masking/unmasking
> unnecessary.
> - The masking by itself is racy unless the driver interrupt handler
> starts by making sure the masking request has reached the device with
> some kind of MMIO-read. Such a MMIO-read is normally the kind of costly
> requests you are happy to get rid of in the MSI model.
> 
> So if it is not useful, it might be better to avoid that systematic
> mask/unmask pair. This masking has a small but measurable performance
> impact for our device/driver combo.
> 
> Would you agree to suppress that masking (sample patch following)? Or
> otherwise, is there is a possibility of making it optional on a
> per-device basis.
> 

Your patch appears to be against the prehistoric 2.6.18 kernel.  MSI
got changed a lot - please test 2.6.19 and see if that needs fixing.

      reply	other threads:[~2006-12-01  5:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29 22:46 mask/unmasking while servicing MSI(-X) unnecessary? Loic Prylli
2006-12-01  5:41 ` Andrew Morton [this message]

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=20061130214103.7ed090e9.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=loic@myri.com \
    /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