Re: [PATCH 3/3] drm/amdgpu: Fix deadlock during GPU reset.

2017-10-23 Thread Christian König
Am 20.10.2017 um 15:32 schrieb Andrey Grodzovsky: Switch from kfifo to SPSC queue. Bug: Kfifo is limited at size, during GPU reset it would fill up to limit and the pushing thread (producer) would wait for the scheduler worker to consume the items in the fifo while holding reservation lock on a

RE: [PATCH 3/3] drm/amdgpu: Fix deadlock during GPU reset.

2017-10-23 Thread Liu, Monk
: 2017年10月23日 15:39 To: Koenig, Christian <christian.koe...@amd.com>; Grodzovsky, Andrey <andrey.grodzov...@amd.com>; amd-gfx@lists.freedesktop.org Subject: RE: [PATCH 3/3] drm/amdgpu: Fix deadlock during GPU reset. Let's make it clear enough: > That won't work. All VM update

RE: [PATCH 3/3] drm/amdgpu: Fix deadlock during GPU reset.

2017-10-23 Thread Liu, Monk
--- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: 2017年10月23日 15:31 To: Liu, Monk <monk@amd.com>; Koenig, Christian <christian.koe...@amd.com>; Grodzovsky, Andrey <andrey.grodzov...@amd.com>; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 3/3] drm/amdgpu: Fix d

Re: [PATCH 3/3] drm/amdgpu: Fix deadlock during GPU reset.

2017-10-23 Thread Christian König
...@gmail.com] Sent: 2017年10月23日 15:09 To: Liu, Monk <monk@amd.com>; Grodzovsky, Andrey <andrey.grodzov...@amd.com>; amd-gfx@lists.freedesktop.org Cc: Koenig, Christian <christian.koe...@amd.com> Subject: Re: [PATCH 3/3] drm/amdgpu: Fix deadlock during GPU reset. We discussed tha

RE: [PATCH 3/3] drm/amdgpu: Fix deadlock during GPU reset.

2017-10-23 Thread Liu, Monk
[mailto:ckoenig.leichtzumer...@gmail.com] Sent: 2017年10月23日 15:09 To: Liu, Monk <monk@amd.com>; Grodzovsky, Andrey <andrey.grodzov...@amd.com>; amd-gfx@lists.freedesktop.org Cc: Koenig, Christian <christian.koe...@amd.com> Subject: Re: [PATCH 3/3] drm/amdgpu: Fix deadlock dur

Re: [PATCH 3/3] drm/amdgpu: Fix deadlock during GPU reset.

2017-10-23 Thread Christian König
We discussed that as well, problem is that this won't be sufficient. We push to the kfifo not only during command submission, but also for VM updates and TTM buffers moves. So we can still deadlock because of them. Regards, Christian. Am 23.10.2017 um 05:03 schrieb Liu, Monk: Why not use a

RE: [PATCH 3/3] drm/amdgpu: Fix deadlock during GPU reset.

2017-10-22 Thread Liu, Monk
Why not use a more simple way ? Like moving ttm_eu_fence_buffer_objects() to before amd_sched_entity_push_job() ? That could solve the deadlock from your description And the push order is already guaranteed by context->mutex (which is also a patch from you) BR Monk -Original