From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: Chunming Zhou <David1.Zhou-5C7GfCeVMHo@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Monk.Liu-5C7GfCeVMHo@public.gmane.org
Subject: Re: [PATCH] drm/amdgpu: fix deadlock of reservation between cs and gpu reset
Date: Thu, 27 Apr 2017 17:08:54 +0800 [thread overview]
Message-ID: <5901B526.6080305@amd.com> (raw)
In-Reply-To: <1493281554-9898-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
On 04/27/2017 04:25 PM, Chunming Zhou wrote:
> the case could happen when gpu reset:
> 1. when gpu reset, cs can be continue until sw queue is full, then push job will wait with holding pd reservation.
> 2. gpu_reset routine will also need pd reservation to restore page table from their shadow.
> 3. cs is waiting for gpu_reset complete, but gpu reset is waiting for cs releases reservation.
>
> Change-Id: I0f66d04b2bef3433035109623c8a5c5992c84202
> Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> index 9edb1a4..a6722a7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -1076,6 +1076,7 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
> amdgpu_job_free_resources(job);
>
> trace_amdgpu_cs_ioctl(job);
> + amdgpu_cs_parser_fini(p, 0, true);
Please confirm:
It will not free/release more things that may be accessed in job working
process, as cs_parse_fini free so many things related to parser.
Or we can just release the pd reservation here?
Jerry
> amd_sched_entity_push_job(&job->base);
>
> return 0;
> @@ -1130,6 +1131,7 @@ int amdgpu_cs_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
>
> r = amdgpu_cs_submit(&parser, cs);
>
> + return r;
> out:
> amdgpu_cs_parser_fini(&parser, r, reserved_buffers);
> return r;
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2017-04-27 9:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-27 8:25 [PATCH] drm/amdgpu: fix deadlock of reservation between cs and gpu reset Chunming Zhou
[not found] ` <1493281554-9898-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2017-04-27 9:08 ` Zhang, Jerry (Junwei) [this message]
[not found] ` <5901B526.6080305-5C7GfCeVMHo@public.gmane.org>
2017-04-27 10:11 ` Christian König
[not found] ` <62336e5c-571a-196f-6c07-be25c928cdd3-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-27 10:23 ` zhoucm1
[not found] ` <5901C6BD.1070303-5C7GfCeVMHo@public.gmane.org>
2017-04-27 12:04 ` Christian König
[not found] ` <b6e45c8f-40a1-4185-89fb-1f4f7719c0fb-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-04-28 2:37 ` Zhang, Jerry (Junwei)
2017-04-27 14:02 ` Liu, Monk
-- strict thread matches above, loose matches on Subject: below --
2017-04-27 7:20 Chunming Zhou
[not found] ` <1493277617-14966-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2017-04-27 8:01 ` zhoucm1
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=5901B526.6080305@amd.com \
--to=jerry.zhang-5c7gfcevmho@public.gmane.org \
--cc=David1.Zhou-5C7GfCeVMHo@public.gmane.org \
--cc=Monk.Liu-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.