linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Karol Herbst <kherbst@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Lyude Paul <lyude@redhat.com>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Mika Westerberg <mika.westerberg@intel.com>,
	Linux PCI <linux-pci@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	nouveau <nouveau@lists.freedesktop.org>,
	Dave Airlie <airlied@gmail.com>,
	Daniel Drake <drake@endlessm.com>,
	Vidya Sagar <vidyas@nvidia.com>,
	Thierry Reding <treding@nvidia.com>
Subject: Re: [PATCH v4] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges
Date: Tue, 19 Nov 2019 16:57:21 -0600	[thread overview]
Message-ID: <20191119225721.GA237491@google.com> (raw)
In-Reply-To: <CACO55tu+8VeyMw1Lb6QvNspaJm9LDgoRbooVhr0s3v9uBt=feg@mail.gmail.com>

[+cc Daniel, Vidya, Thierry; thread starts at
https://lore.kernel.org/r/20191017121901.13699-1-kherbst@redhat.com]

On Tue, Nov 19, 2019 at 11:26:45PM +0100, Karol Herbst wrote:
> On Tue, Nov 19, 2019 at 10:50 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Thu, Oct 17, 2019 at 02:19:01PM +0200, Karol Herbst wrote:
> > > Fixes state transitions of Nvidia Pascal GPUs from D3cold into
> > > higher device states.
> > > ...

> > > + *  - kernel crashes, as all pci reads return -1, which most code
> > > + *    isn't able to handle well enough.
> >
> > More details about these crashes would be useful as we look at
> > places that *should* be able to handle errors like this.
> 
> makes sense, I could ,orthogonal to this, make the code more robust
> if we hit issues like this in the future. What I am mostly wondering
> about is, why pci core doesn't give up if the device doesn't come
> back from D3cold? It sounds like, that the most sane thing to do
> here is to just give up and fail runtime_resume and report errors
> back to userspace trying to make use of the devices.

It's possible there's something the core could do here.  It's
interesting that we have at least three issues in this area in this
release:

  1) This NVIDIA GPU issue
  2) Daniel's issue with AMD Ryzen5/7 XHCI power-on
     (https://lore.kernel.org/r/20191014061355.29072-1-drake@endlessm.com)
  3) Vidya's issue with Intel 750 NVMe power-on
     (https://lore.kernel.org/r/20191118172310.21373-1-vidyas@nvidia.com)

Vidya's current patch is the most generic (calling pci_dev_wait() from
pci_power_up()).  That will print a warning if the device doesn't
respond, but we still don't go as far as returning errors to
runtime_resume.

This is definitely something we should consider improving in the
future.

> > > + *  - sudden shutdowns, as the kernel identified an unrecoverable error after
> > > + *    userspace tries to access the GPU.
> >
> > This doesn't fit with the others and more details might be
> > informative here as well.
> 
> yeah.. I try to get more infos on that. But at least for me (and it
> might be a distribution thing) if I execute lspci, the system shuts
> down, or at least tries to and might fail.

The lspci doesn't need to be after the failure occurs.  You can do it
immediately after boot.

If you can capture any part of the dmesg or console log of these
sudden shutdowns, that's all I'm interested in at this point.

Bjorn

  reply	other threads:[~2019-11-19 22:57 UTC|newest]

Thread overview: 67+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17 12:19 [PATCH v4] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges Karol Herbst
2019-11-14 19:17 ` Karol Herbst
2019-11-19 20:06 ` Dave Airlie
2019-11-19 21:49 ` Bjorn Helgaas
2019-11-19 22:26   ` Karol Herbst
2019-11-19 22:57     ` Bjorn Helgaas [this message]
2019-11-20 10:18     ` Mika Westerberg
2019-11-20 10:52       ` Rafael J. Wysocki
2019-11-20 11:22         ` Mika Westerberg
2019-11-20 11:48           ` Rafael J. Wysocki
2019-11-20 11:51             ` Karol Herbst
2019-11-20 12:06               ` Rafael J. Wysocki
2019-11-20 12:09                 ` Karol Herbst
2019-11-20 12:14                   ` Rafael J. Wysocki
2019-11-20 12:19                     ` Karol Herbst
2019-11-20 12:11                 ` Rafael J. Wysocki
2019-11-20 11:51           ` Mika Westerberg
2019-11-20 11:54             ` Karol Herbst
2019-11-20 11:58               ` Karol Herbst
2019-11-20 12:09                 ` Mika Westerberg
2019-11-20 12:11                   ` Karol Herbst
2019-11-20 15:15                     ` Mika Westerberg
2019-11-20 15:37                       ` Karol Herbst
2019-11-20 15:53                         ` Mika Westerberg
2019-11-20 16:23                           ` Mika Westerberg
2019-11-20 21:36                             ` Karol Herbst
2019-11-21 10:14                               ` Mika Westerberg
2019-11-21 11:03                                 ` Rafael J. Wysocki
2019-11-21 11:08                                   ` Rafael J. Wysocki
2019-11-21 11:15                                     ` Rafael J. Wysocki
2019-11-21 11:17                                   ` Mika Westerberg
2019-11-21 11:31                                     ` Rafael J. Wysocki
2019-11-20 21:37                           ` Rafael J. Wysocki
2019-11-20 21:40                             ` Karol Herbst
2019-11-20 22:29                               ` Rafael J. Wysocki
2019-11-21 11:28                                 ` Mika Westerberg
2019-11-21 11:34                                   ` Rafael J. Wysocki
2019-11-21 11:46                                     ` Mika Westerberg
2019-11-21 12:52                                       ` Mika Westerberg
2019-11-21 12:56                                         ` Karol Herbst
2019-11-21 15:43                                         ` Rafael J. Wysocki
2019-11-21 19:49                                           ` Mika Westerberg
2019-11-21 22:39                                             ` Rafael J. Wysocki
2019-11-21 22:50                                               ` Karol Herbst
2019-11-22  0:13                                                 ` Karol Herbst
2019-11-22  9:07                                                   ` Rafael J. Wysocki
2019-11-22 11:30                                                     ` Karol Herbst
2019-11-22 10:36                                               ` Mika Westerberg
2019-11-22 11:30                                                 ` Rafael J. Wysocki
2019-11-22 11:34                                                   ` Karol Herbst
2019-11-22 11:54                                                     ` Rafael J. Wysocki
2019-11-22 11:52                                                   ` Mika Westerberg
2019-11-22 12:15                                                     ` Rafael J. Wysocki
2019-11-21 12:52                                       ` Karol Herbst
2019-11-21 15:47                                         ` Rafael J. Wysocki
2019-11-21 16:06                                           ` Karol Herbst
2019-11-21 16:39                                             ` Rafael J. Wysocki
2019-11-26 23:10                                               ` Lyude Paul
2019-11-27 11:48                                                 ` Mika Westerberg
2019-11-27 11:51                                                   ` Karol Herbst
2019-11-27 19:51                                                     ` Lyude Paul
2019-12-09 11:17                                                       ` Karol Herbst
2019-12-09 11:38                                                         ` Rafael J. Wysocki
2019-12-09 12:24                                                           ` Karol Herbst
2019-12-10 19:58                                                           ` Dave Airlie
2019-12-10 20:49                                                             ` Karol Herbst
2020-01-13 15:31                                                               ` Karol Herbst

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=20191119225721.GA237491@google.com \
    --to=helgaas@kernel.org \
    --cc=airlied@gmail.com \
    --cc=drake@endlessm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kherbst@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=mika.westerberg@intel.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=rjw@rjwysocki.net \
    --cc=treding@nvidia.com \
    --cc=vidyas@nvidia.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).