Re: [PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2
Am 24.09.2018 um 17:32 schrieb Andrey Grodzovsky: On 09/24/2018 11:19 AM, Christian König wrote: Thanks. One more thing which came to my mind is that we might want to print the warning only when amdgpu_fence_process has actually done some processing. Otherwise we could get warnings for long running jobs. Do you mean that you want to know that amdgpu_fence_process was called from the SW fallback timer and print warning only if last_seq != seq and the while loop actually signaled something ? Yeah, something like that. Christian. Andrey Christian. Am 24.09.2018 um 17:14 schrieb Andrey Grodzovsky: P.S I pushed it. Thanks, Andrey On 09/24/2018 11:13 AM, Andrey Grodzovsky wrote: Reviewed-and-Tested-by: Andrey Grodzovsky Andrey On 09/24/2018 10:31 AM, Deucher, Alexander wrote: Acked-by: Alex Deucher *From:* amd-gfx on behalf of Christian König *Sent:* Monday, September 24, 2018 8:10:22 AM *To:* amd-gfx@lists.freedesktop.org *Subject:* [PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2 From: Andrey Grodzovsky Deactivate SW interrupt fallback when all emited fences are completed. Also switch interrupt SW fallback message from INFO to WARN. v2: shorten the warnign message a bit and only re-activate the timer during processing if it was already activated before. Signed-off-by: Andrey Grodzovsky Suggested-by: Christian Konig --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 1ae25835cad1..4e6e9c9654dd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -229,7 +229,8 @@ void amdgpu_fence_process(struct amdgpu_ring *ring) } while (atomic_cmpxchg(>last_seq, last_seq, seq) != last_seq); - if (seq != ring->fence_drv.sync_seq) + if (del_timer(>fence_drv.fallback_timer) && + seq != ring->fence_drv.sync_seq) amdgpu_fence_schedule_fallback(ring); if (unlikely(seq == last_seq)) @@ -274,7 +275,7 @@ static void amdgpu_fence_fallback(struct timer_list *t) struct amdgpu_ring *ring = from_timer(ring, t, fence_drv.fallback_timer); - DRM_INFO("Fallback to SW interrupt on ring %s due to HW interrupt time out", ring->name); + DRM_WARN("Fence fallback timer expired on ring %s\n", ring->name); amdgpu_fence_process(ring); } -- 2.14.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2
On 09/24/2018 11:19 AM, Christian König wrote: Thanks. One more thing which came to my mind is that we might want to print the warning only when amdgpu_fence_process has actually done some processing. Otherwise we could get warnings for long running jobs. Do you mean that you want to know that amdgpu_fence_process was called from the SW fallback timer and print warning only if last_seq != seq and the while loop actually signaled something ? Andrey Christian. Am 24.09.2018 um 17:14 schrieb Andrey Grodzovsky: P.S I pushed it. Thanks, Andrey On 09/24/2018 11:13 AM, Andrey Grodzovsky wrote: Reviewed-and-Tested-by: Andrey Grodzovsky Andrey On 09/24/2018 10:31 AM, Deucher, Alexander wrote: Acked-by: Alex Deucher *From:* amd-gfx on behalf of Christian König *Sent:* Monday, September 24, 2018 8:10:22 AM *To:* amd-gfx@lists.freedesktop.org *Subject:* [PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2 From: Andrey Grodzovsky Deactivate SW interrupt fallback when all emited fences are completed. Also switch interrupt SW fallback message from INFO to WARN. v2: shorten the warnign message a bit and only re-activate the timer during processing if it was already activated before. Signed-off-by: Andrey Grodzovsky Suggested-by: Christian Konig --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 1ae25835cad1..4e6e9c9654dd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -229,7 +229,8 @@ void amdgpu_fence_process(struct amdgpu_ring *ring) } while (atomic_cmpxchg(>last_seq, last_seq, seq) != last_seq); - if (seq != ring->fence_drv.sync_seq) + if (del_timer(>fence_drv.fallback_timer) && + seq != ring->fence_drv.sync_seq) amdgpu_fence_schedule_fallback(ring); if (unlikely(seq == last_seq)) @@ -274,7 +275,7 @@ static void amdgpu_fence_fallback(struct timer_list *t) struct amdgpu_ring *ring = from_timer(ring, t, fence_drv.fallback_timer); - DRM_INFO("Fallback to SW interrupt on ring %s due to HW interrupt time out", ring->name); + DRM_WARN("Fence fallback timer expired on ring %s\n", ring->name); amdgpu_fence_process(ring); } -- 2.14.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2
Thanks. One more thing which came to my mind is that we might want to print the warning only when amdgpu_fence_process has actually done some processing. Otherwise we could get warnings for long running jobs. Christian. Am 24.09.2018 um 17:14 schrieb Andrey Grodzovsky: P.S I pushed it. Thanks, Andrey On 09/24/2018 11:13 AM, Andrey Grodzovsky wrote: Reviewed-and-Tested-by: Andrey Grodzovsky Andrey On 09/24/2018 10:31 AM, Deucher, Alexander wrote: Acked-by: Alex Deucher *From:* amd-gfx on behalf of Christian König *Sent:* Monday, September 24, 2018 8:10:22 AM *To:* amd-gfx@lists.freedesktop.org *Subject:* [PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2 From: Andrey Grodzovsky Deactivate SW interrupt fallback when all emited fences are completed. Also switch interrupt SW fallback message from INFO to WARN. v2: shorten the warnign message a bit and only re-activate the timer during processing if it was already activated before. Signed-off-by: Andrey Grodzovsky Suggested-by: Christian Konig --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 1ae25835cad1..4e6e9c9654dd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -229,7 +229,8 @@ void amdgpu_fence_process(struct amdgpu_ring *ring) } while (atomic_cmpxchg(>last_seq, last_seq, seq) != last_seq); - if (seq != ring->fence_drv.sync_seq) + if (del_timer(>fence_drv.fallback_timer) && + seq != ring->fence_drv.sync_seq) amdgpu_fence_schedule_fallback(ring); if (unlikely(seq == last_seq)) @@ -274,7 +275,7 @@ static void amdgpu_fence_fallback(struct timer_list *t) struct amdgpu_ring *ring = from_timer(ring, t, fence_drv.fallback_timer); - DRM_INFO("Fallback to SW interrupt on ring %s due to HW interrupt time out", ring->name); + DRM_WARN("Fence fallback timer expired on ring %s\n", ring->name); amdgpu_fence_process(ring); } -- 2.14.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2
P.S I pushed it. Thanks, Andrey On 09/24/2018 11:13 AM, Andrey Grodzovsky wrote: Reviewed-and-Tested-by: Andrey Grodzovsky Andrey On 09/24/2018 10:31 AM, Deucher, Alexander wrote: Acked-by: Alex Deucher *From:* amd-gfx on behalf of Christian König *Sent:* Monday, September 24, 2018 8:10:22 AM *To:* amd-gfx@lists.freedesktop.org *Subject:* [PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2 From: Andrey Grodzovsky Deactivate SW interrupt fallback when all emited fences are completed. Also switch interrupt SW fallback message from INFO to WARN. v2: shorten the warnign message a bit and only re-activate the timer during processing if it was already activated before. Signed-off-by: Andrey Grodzovsky Suggested-by: Christian Konig --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 1ae25835cad1..4e6e9c9654dd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -229,7 +229,8 @@ void amdgpu_fence_process(struct amdgpu_ring *ring) } while (atomic_cmpxchg(>last_seq, last_seq, seq) != last_seq); - if (seq != ring->fence_drv.sync_seq) + if (del_timer(>fence_drv.fallback_timer) && + seq != ring->fence_drv.sync_seq) amdgpu_fence_schedule_fallback(ring); if (unlikely(seq == last_seq)) @@ -274,7 +275,7 @@ static void amdgpu_fence_fallback(struct timer_list *t) struct amdgpu_ring *ring = from_timer(ring, t, fence_drv.fallback_timer); - DRM_INFO("Fallback to SW interrupt on ring %s due to HW interrupt time out", ring->name); + DRM_WARN("Fence fallback timer expired on ring %s\n", ring->name); amdgpu_fence_process(ring); } -- 2.14.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2
Reviewed-and-Tested-by: Andrey Grodzovsky Andrey On 09/24/2018 10:31 AM, Deucher, Alexander wrote: Acked-by: Alex Deucher *From:* amd-gfx on behalf of Christian König *Sent:* Monday, September 24, 2018 8:10:22 AM *To:* amd-gfx@lists.freedesktop.org *Subject:* [PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2 From: Andrey Grodzovsky Deactivate SW interrupt fallback when all emited fences are completed. Also switch interrupt SW fallback message from INFO to WARN. v2: shorten the warnign message a bit and only re-activate the timer during processing if it was already activated before. Signed-off-by: Andrey Grodzovsky Suggested-by: Christian Konig --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 1ae25835cad1..4e6e9c9654dd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -229,7 +229,8 @@ void amdgpu_fence_process(struct amdgpu_ring *ring) } while (atomic_cmpxchg(>last_seq, last_seq, seq) != last_seq); - if (seq != ring->fence_drv.sync_seq) + if (del_timer(>fence_drv.fallback_timer) && + seq != ring->fence_drv.sync_seq) amdgpu_fence_schedule_fallback(ring); if (unlikely(seq == last_seq)) @@ -274,7 +275,7 @@ static void amdgpu_fence_fallback(struct timer_list *t) struct amdgpu_ring *ring = from_timer(ring, t, fence_drv.fallback_timer); - DRM_INFO("Fallback to SW interrupt on ring %s due to HW interrupt time out", ring->name); + DRM_WARN("Fence fallback timer expired on ring %s\n", ring->name); amdgpu_fence_process(ring); } -- 2.14.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[PATCH] drm/amdgpu: Deactivate SW interrupt fallback in amdgpu_fence_process v2
From: Andrey Grodzovsky Deactivate SW interrupt fallback when all emited fences are completed. Also switch interrupt SW fallback message from INFO to WARN. v2: shorten the warnign message a bit and only re-activate the timer during processing if it was already activated before. Signed-off-by: Andrey Grodzovsky Suggested-by: Christian Konig --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c index 1ae25835cad1..4e6e9c9654dd 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c @@ -229,7 +229,8 @@ void amdgpu_fence_process(struct amdgpu_ring *ring) } while (atomic_cmpxchg(>last_seq, last_seq, seq) != last_seq); - if (seq != ring->fence_drv.sync_seq) + if (del_timer(>fence_drv.fallback_timer) && + seq != ring->fence_drv.sync_seq) amdgpu_fence_schedule_fallback(ring); if (unlikely(seq == last_seq)) @@ -274,7 +275,7 @@ static void amdgpu_fence_fallback(struct timer_list *t) struct amdgpu_ring *ring = from_timer(ring, t, fence_drv.fallback_timer); - DRM_INFO("Fallback to SW interrupt on ring %s due to HW interrupt time out", ring->name); + DRM_WARN("Fence fallback timer expired on ring %s\n", ring->name); amdgpu_fence_process(ring); } -- 2.14.1 ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx