mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "André Almeida" <andrealmeid@igalia.com>
To: "Timur Kristóf" <timur.kristof@gmail.com>,
	"Felix Kuehling" <felix.kuehling@amd.com>
Cc: "Alex Deucher" <alexdeucher@gmail.com>,
	"Pelloux-Prayer,
	Pierre-Eric" <pierre-eric.pelloux-prayer@amd.com>,
	"Marek Olšák" <maraeo@gmail.com>,
	michel.daenzer@mailbox.org,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"Christian König" <ckoenig.leichtzumerken@gmail.com>,
	linux-kernel@vger.kernel.org,
	"Samuel Pitoiset" <samuel.pitoiset@gmail.com>,
	"amd-gfx list" <amd-gfx@lists.freedesktop.org>,
	kernel-dev@igalia.com, "Deucher,
	Alexander" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [RFC PATCH 0/1] Add AMDGPU_INFO_GUILTY_APP ioctl
Date: Wed, 3 May 2023 16:14:11 -0300	[thread overview]
Message-ID: <59774c28-a0ef-d4f2-e920-503857bce1cf@igalia.com> (raw)
In-Reply-To: <967a044bc2723cc24ab914506c0164db08923c59.camel@gmail.com>

Em 03/05/2023 14:43, Timur Kristóf escreveu:
> Hi Felix,
> 
> On Wed, 2023-05-03 at 11:08 -0400, Felix Kuehling wrote:
>> That's the worst-case scenario where you're debugging HW or FW
>> issues.
>> Those should be pretty rare post-bringup. But are there hangs caused
>> by
>> user mode driver or application bugs that are easier to debug and
>> probably don't even require a GPU reset?
> 
> There are many GPU hangs that gamers experience while playing. We have
> dozens of open bug reports against RADV about GPU hangs on various GPU
> generations. These usually fall into two categories:
> 
> 1. When the hang always happens at the same point in a game. These are
> painful to debug but manageable.
> 2. "Random" hangs that happen to users over the course of playing a
> game for several hours. It is absolute hell to try to even reproduce
> let alone diagnose these issues, and this is what we would like to
> improve.
> 
> For these hard-to-diagnose problems, it is already a challenge to
> determine whether the problem is the kernel (eg. setting wrong voltages
> / frequencies) or userspace (eg. missing some synchronization), can be
> even a game bug that we need to work around.
> 
>> For example most VM faults can
>> be handled without hanging the GPU. Similarly, a shader in an endless
>> loop should not require a full GPU reset.
> 
> This is actually not the case, AFAIK André's test case was an app that
> had an infinite loop in a shader.
> 

This is the test app if anyone want to try out: 
https://github.com/andrealmeid/vulkan-triangle-v1. Just compile and run.

The kernel calls amdgpu_ring_soft_recovery() when I run my example, but 
I'm not sure what a soft recovery means here and if it's a full GPU 
reset or not.

But if we can at least trust the CP registers to dump information for 
soft resets, it would be some improvement from the current state I think

>>
>> It's more complicated for graphics because of the more complex
>> pipeline
>> and the lack of CWSR. But it should still be possible to do some
>> debugging without JTAG if the problem is in SW and not HW or FW. It's
>> probably worth improving that debugability without getting hung-up on
>> the worst case.
> 
> I agree, and we welcome any constructive suggestion to improve the
> situation. It seems like our idea doesn't work if the kernel can't give
> us the information we need.
> 
> How do we move forward?
> 
> Best regards,
> Timur
> 

  reply	other threads:[~2023-05-03 19:15 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-01 18:57 André Almeida
2023-05-01 18:57 ` [RFC PATCH 1/1] drm/amdgpu: Add interface to dump guilty IB on GPU hang André Almeida
2023-05-01 19:27   ` Alex Deucher
2023-05-01 19:24 ` [RFC PATCH 0/1] Add AMDGPU_INFO_GUILTY_APP ioctl Alex Deucher
2023-05-02  1:26   ` André Almeida
2023-05-02  7:59     ` Christian König
     [not found]       ` <CAFF-SiV0=WNmRW-D9uYUuj68Zq0APxtGLya9KR6FfZ7v0Zf2RQ@mail.gmail.com>
2023-05-02  9:30         ` Bas Nieuwenhuizen
     [not found]         ` <fcca2934-a556-797c-535d-a66fc67bbe30@amd.com>
2023-05-02 13:34           ` Timur Kristóf
2023-05-02 13:45             ` Alex Deucher
2023-05-02 15:22               ` Timur Kristóf
2023-05-02 18:41                 ` Alex Deucher
2023-05-03  7:59                   ` Christian König
2023-05-03 15:08                     ` Felix Kuehling
2023-05-03 15:23                       ` Christian König
     [not found]                         ` <CAAxE2A7wzrt9m0LifB=vPFr7aEtwyh9zzDDh9DkZJux2A4kKqw@mail.gmail.com>
2023-05-03 18:52                           ` André Almeida
2023-05-03 17:43                       ` Timur Kristóf
2023-05-03 19:14                         ` André Almeida [this message]
2023-05-04  6:43                           ` Christian König
2023-05-02  7:48 ` Christian König

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=59774c28-a0ef-d4f2-e920-503857bce1cf@igalia.com \
    --to=andrealmeid@igalia.com \
    --cc=alexander.deucher@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=felix.kuehling@amd.com \
    --cc=kernel-dev@igalia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maraeo@gmail.com \
    --cc=michel.daenzer@mailbox.org \
    --cc=pierre-eric.pelloux-prayer@amd.com \
    --cc=samuel.pitoiset@gmail.com \
    --cc=timur.kristof@gmail.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

all inboxes | Powered by JetHome®