From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Monk Liu <Monk.Liu-5C7GfCeVMHo@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 3/5] drm/amdgpu:implement guilty pointer
Date: Fri, 20 Oct 2017 11:08:31 +0200 [thread overview]
Message-ID: <f3a9431e-31fd-e8a5-79e9-d8bb09de366b@gmail.com> (raw)
In-Reply-To: <1508470385-16164-3-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
Am 20.10.2017 um 05:33 schrieb Monk Liu:
> for user context there will be a guilty pointer in entity
> that points to the guilty member of its context, thus we
> cant track if a given entity is not from kernel ctx and
> if it is already marked guilty.
>
> Change-Id: Ie0a30830d89f52a6c4a514e67206140698a46367
> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +
> drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 1 +
> drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 1 +
> 3 files changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 774edc1..6a4178b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -744,6 +744,7 @@ struct amdgpu_ctx {
> enum amd_sched_priority init_priority;
> enum amd_sched_priority override_priority;
> struct mutex lock;
> + atomic_t guilty;
> };
>
> struct amdgpu_ctx_mgr {
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> index c184468..d822e95 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> @@ -93,6 +93,7 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev,
> rq, amdgpu_sched_jobs);
> if (r)
> goto failed;
> + ctx->rings[i].entity.guilty = &ctx->guilty;
Don't set this directly, make it a parameter of amd_sched_entity_init().
And please split up the patches differently.
First all changes to the scheduler, including the guilty marking.
Then the changes to amdgpu.
Regards,
Christian.
> }
>
> r = amdgpu_queue_mgr_init(adev, &ctx->queue_mgr);
> diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
> index 1dac7bc..2d59fc5 100644
> --- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
> +++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h
> @@ -50,6 +50,7 @@ struct amd_sched_entity {
>
> struct dma_fence *dependency;
> struct dma_fence_cb cb;
> + atomic_t *guilty; /* points to ctx's guilty */
> };
>
> /**
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2017-10-20 9:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-20 3:33 [PATCH 1/5] drm/amdgpu:cleanup force_completion Monk Liu
[not found] ` <1508470385-16164-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-20 3:33 ` [PATCH 2/5] drm/amdgpu:add hang_limit for sched Monk Liu
[not found] ` <1508470385-16164-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-20 9:03 ` Christian König
[not found] ` <2002cd84-8f78-52c3-d56c-faa43add4050-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-20 9:41 ` Liu, Monk
2017-10-20 3:33 ` [PATCH 3/5] drm/amdgpu:implement guilty pointer Monk Liu
[not found] ` <1508470385-16164-3-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-20 9:08 ` Christian König [this message]
[not found] ` <f3a9431e-31fd-e8a5-79e9-d8bb09de366b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-23 4:26 ` Liu, Monk
[not found] ` <BLUPR12MB0449682AC30F4365B0A5068284460-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-23 7:17 ` Christian König
[not found] ` <9ee4a45a-53c5-5a70-449f-714b90a3de08-5C7GfCeVMHo@public.gmane.org>
2017-10-23 7:53 ` Liu, Monk
2017-10-20 3:33 ` [PATCH 4/5] drm/amdgpu:cleanup job reset routine Monk Liu
[not found] ` <1508470385-16164-4-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-20 9:06 ` Christian König
[not found] ` <85ee460e-1f65-69c7-c17b-329d9b31d205-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-20 10:00 ` Liu, Monk
2017-10-20 3:33 ` [PATCH 5/5] drm/amdgpu:skip job for guilty ctx in parser_init Monk Liu
[not found] ` <1508470385-16164-5-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-20 9:09 ` Christian König
2017-10-20 7:17 ` [PATCH 1/5] drm/amdgpu:cleanup force_completion 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=f3a9431e-31fd-e8a5-79e9-d8bb09de366b@gmail.com \
--to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=Monk.Liu-5C7GfCeVMHo@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox