From: Prarit Bhargava <prarit@redhat.com>
To: Keith Busch <keith.busch@intel.com>
Cc: linux-pci@vger.kernel.org,
Alex Williamson <alex.williamson@redhat.com>,
David Arcari <darcari@redhat.com>,
Myron Stowe <mstowe@redhat.com>,
Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [RFE PATCH] pci: Do not enable intx on MSI-capable devices on shutdown
Date: Wed, 26 Oct 2016 10:00:53 -0400 [thread overview]
Message-ID: <5810B715.2040308@redhat.com> (raw)
In-Reply-To: <20161025221613.GA32365@localhost.localdomain>
On 10/25/2016 06:16 PM, Keith Busch wrote:
> On Tue, Oct 25, 2016 at 03:08:54PM -0400, Prarit Bhargava wrote:
>> When pci_disable_msi() is currently called the result is that device is
>> switched back to intx and then the MSI IRQs are free'd. This patch would
>> modify that behavior, and intx would not be reenabled when pci_disable_msix()
>> was called during runtime. With the system_state patch we're only affecting
>> shutdown, which is seen as less risky than doing
>
> My proposal isn't really modifying exisiting behavior since if it does,
> the currently in place expectations are being violated: if anyone calls
> "pci_disable_msi" with actions on the irqs being disabled, they're
> already screwed since they will hit the BUG_ON in free_msi_irqs.
I thought msi_has_action() would have returned 1 until free_msi_irqs() was
called. Yes, your patch would work.
I also want to add this interesting tidbit: I have noticed in the past that
*many* systems no longer print the
Restarting system.
reboot: machine restart
[and some also print an extra line of, "ACPI MEMORY or I/O RESET_REG"]
messages at the end of boot. For a long time I had assumed that this was
because the reboot was racing with printk somehow and that the system shutdown
or rebooted before those lines made it "out" through the serial port.
With the previously rejected patch from
https://patchwork.kernel.org/patch/5990701/
the messages are output to the screen again (I'm not 100% sure on this but I
think this is occurring for systems where the serial port or usb port is behind
a pci device). This result lends more support to the idea that we're doing
something wrong by blindly disabling msi/x interrupts when the driver doesn't
support it.
There are several ways of fixing this, and I'm not sure one is better than the
other. It seems no matter what we do here there's risk of breaking something
and I'm leaning towards fixing this by only calling the msi disable code when a
shutdown function has been called.
Bjorn, I'd like to hear what you think...
P.
prev parent reply other threads:[~2016-10-26 14:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-21 12:14 [RFE PATCH] pci: Do not enable intx on MSI-capable devices on shutdown Prarit Bhargava
2016-10-24 9:44 ` Lukas Wunner
2016-10-24 13:52 ` Prarit Bhargava
2016-10-25 18:08 ` Keith Busch
2016-10-25 19:08 ` Prarit Bhargava
2016-10-25 22:16 ` Keith Busch
2016-10-26 14:00 ` Prarit Bhargava [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=5810B715.2040308@redhat.com \
--to=prarit@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=darcari@redhat.com \
--cc=keith.busch@intel.com \
--cc=linux-pci@vger.kernel.org \
--cc=mstowe@redhat.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;
as well as URLs for NNTP newsgroup(s).