From: mikhail.v.gavrilov@gmail.com
To: Daniel Vetter <daniel@ffwll.ch>, Hillf Danton <hdanton@sina.com>
Cc: dri-devel <dri-devel@lists.freedesktop.org>,
amd-gfx list <amd-gfx@lists.freedesktop.org>,
Linux List Kernel Mailing <linux-kernel@vger.kernel.org>
Subject: Re: gnome-shell stuck because of amdgpu driver [5.3 RC5]
Date: Fri, 30 Aug 2019 03:03:58 +0500 [thread overview]
Message-ID: <a07be36905f145f2fb07beee73f9d3805c285022.camel@gmail.com> (raw)
In-Reply-To: <20190826092408.GA2112@phenom.ffwll.local>
On Sun, Aug 25, 2019 at 10:13:05PM +0800, Hillf Danton wrote:
> Can we try to add the fallback timer manually?
>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> @@ -322,6 +322,10 @@ int amdgpu_fence_wait_empty(struct amdgp
> }
> rcu_read_unlock();
>
> + if (!timer_pending(&ring->fence_drv.fallback_timer))
> + mod_timer(&ring->fence_drv.fallback_timer,
> + jiffies + (AMDGPU_FENCE_JIFFIES_TIMEOUT <<
> 1));
> +
> r = dma_fence_wait(fence, false);
> dma_fence_put(fence);
> return r;
> --
>
> Or simply wait with an ear on signal and timeout if adding timer
> seems to go a bit too far?
>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
> @@ -322,7 +322,12 @@ int amdgpu_fence_wait_empty(struct amdgp
> }
> rcu_read_unlock();
>
> - r = dma_fence_wait(fence, false);
> + if (0 < dma_fence_wait_timeout(fence, true,
> + AMDGPU_FENCE_JIFFIES_TIMEOUT +
> + (AMDGPU_FENCE_JIFFIES_TIMEOUT >> 3)))
> + r = 0;
> + else
> + r = -EINVAL;
> dma_fence_put(fence);
> return r;
> }
I tested both patches on top of 5.3 RC6. Each patch I was tested more
than 24 hours and I don't seen any regressions or problems with them.
On Mon, 2019-08-26 at 11:24 +0200, Daniel Vetter wrote:
>
> This will paper over the issue, but won't fix it. dma_fences have to
> complete, at least for normal operations, otherwise your desktop will
> start feeling like the gpu hangs all the time.
>
> I think would be much more interesting to dump which fence isn't
> completing here in time, i.e. not just the timeout, but lots of debug
> printks.
> -Daniel
As I am understood none of these patches couldn't be merged because
they do not fix the root cause they eliminate only the consequences?
Eliminating consequences has any negative effects? And we will never
know the root cause because not having enough debugging information.
next prev parent reply other threads:[~2019-08-29 22:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190825141305.13984-1-hdanton@sina.com>
2019-08-26 9:24 ` Daniel Vetter
2019-08-29 22:03 ` mikhail.v.gavrilov [this message]
[not found] <20190830032948.13516-1-hdanton@sina.com>
2019-09-03 6:48 ` Mikhail Gavrilov
[not found] ` <5d6e2298.1c69fb81.b5532.8395SMTPIN_ADDED_MISSING@mx.google.com>
2019-09-03 18:07 ` Mikhail Gavrilov
2019-09-03 20:18 ` Daniel Vetter
[not found] ` <5d6f10a6.1c69fb81.6b104.af73SMTPIN_ADDED_MISSING@mx.google.com>
2019-09-04 8:37 ` Daniel Vetter
2019-09-04 22:26 ` Mikhail Gavrilov
2019-09-05 7:58 ` Daniel Vetter
2019-09-08 21:24 ` Mikhail Gavrilov
2019-09-09 9:15 ` Koenig, Christian
2019-09-15 19:47 ` Mikhail Gavrilov
2019-08-25 11:27 Mikhail Gavrilov
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=a07be36905f145f2fb07beee73f9d3805c285022.camel@gmail.com \
--to=mikhail.v.gavrilov@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
/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®