AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: "Liu, Monk" <Monk.Liu-5C7GfCeVMHo@public.gmane.org>,
	"Koenig,
	Christian" <Christian.Koenig-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 7/9] drm/amdgpu:block kms open during gpu_reset
Date: Thu, 26 Oct 2017 17:15:12 +0200	[thread overview]
Message-ID: <46a5317f-e606-5cfe-82c9-46df64818435@gmail.com> (raw)
In-Reply-To: <BLUPR12MB044997E32FD02ACDBD978C7084450-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>

Am 26.10.2017 um 13:08 schrieb Liu, Monk:
> "Clear operation on the page table " is some kind of SDMA activity right? What if ASIC RESET from amd_gpu_recover() interrupted this activity in fly ???
I can't see any difference between the handling of existing VMs and new 
created ones.

Either we have correct handling and can redo the activity or we have 
corrupted VM page tables and crash again immediately.

So we need to handle this gracefully anyway,
Christian.

>
> BR Monk
>
> -----Original Message-----
> From: Koenig, Christian
> Sent: 2017年10月26日 18:54
> To: Liu, Monk <Monk.Liu@amd.com>; amd-gfx@lists.freedesktop.org
> Subject: Re: [PATCH 7/9] drm/amdgpu:block kms open during gpu_reset
>
>> if we don't block device open while gpu doing recover, the vm init
>> (SDMA working on page table creating) would be ruined by ASIC RESET
> That is not a problem at all. SDMA just does some clear operation on the page tables and those are either recovered from the shadow or run after the reset.
>
> Regards,
> Christian.
>
> Am 26.10.2017 um 10:17 schrieb Liu, Monk:
>> When amdgpu_gpu_recover() routine is in the fly, we shouldn't let UMD open our device, otherwise the VM init would be ruined by gpu_recover().
>>
>> e.g. VM init need to create page table, but keep In mind that
>> gpu_recover() calls ASIC RESET,
>>
>> if we don't block device open while gpu doing recover, the vm init
>> (SDMA working on page table creating) would be ruined by ASIC RESET
>>
>> do you have any good solution ? the key point is avoid/delay/push_back
>> hw activities from UMD side when we are running in gpu_recover()
>> function
>>
>> BR Monk
>>
>> -----Original Message-----
>> From: Christian König [mailto:ckoenig.leichtzumerken@gmail.com]
>> Sent: 2017年10月26日 15:18
>> To: Liu, Monk <Monk.Liu@amd.com>; amd-gfx@lists.freedesktop.org
>> Subject: Re: [PATCH 7/9] drm/amdgpu:block kms open during gpu_reset
>>
>> NAK, why the heck should we do this? It would just block all new processes from using the device.
>>
>> Christian.
>>
>> Am 25.10.2017 um 11:22 schrieb Monk Liu:
>>> Change-Id: Ibdb0ea9e3769d572fbbc13bbf1ef73f1af2ab7be
>>> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
>>> ---
>>>     drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +++
>>>     1 file changed, 3 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>>> index 4a9f749..c155ce4 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
>>> @@ -813,6 +813,9 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
>>>     	if (r < 0)
>>>     		return r;
>>>     
>>> +	if (adev->in_gpu_reset)
>>> +		return -ENODEV;
>>> +
>>>     	fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL);
>>>     	if (unlikely(!fpriv)) {
>>>     		r = -ENOMEM;
> _______________________________________________
> 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

  parent reply	other threads:[~2017-10-26 15:15 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25  9:22 [PATCH 0/9] *** patch series for new gpu recover*** Monk Liu
     [not found] ` <1508923343-24404-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-25  9:22   ` [PATCH 1/9] drm/amdgpu:cleanup hw fence get&put Monk Liu
     [not found]     ` <1508923343-24404-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-25 11:38       ` Christian König
2017-10-25  9:22   ` [PATCH 2/9] amd/scheduler:imple job skip feature Monk Liu
     [not found]     ` <1508923343-24404-3-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-26  7:06       ` Christian König
     [not found]         ` <79a7f228-3d63-e043-58c1-2986379b6296-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-26  8:11           ` Liu, Monk
2017-10-25  9:22   ` [PATCH 3/9] drm/amdgpu:implement new GPU recover(v2) Monk Liu
     [not found]     ` <1508923343-24404-4-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-26  7:11       ` Christian König
2017-10-25  9:22   ` [PATCH 4/9] drm/amdgpu:replace deprecated gpu reset Monk Liu
     [not found]     ` <1508923343-24404-5-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-26  7:13       ` Christian König
     [not found]         ` <13ad16b1-6357-1f0e-3cdd-ddc42d4462b0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-26  8:13           ` Liu, Monk
     [not found]             ` <BLUPR12MB04499B9B8F278BE639D144A184450-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-26  8:16               ` Christian König
2017-10-25  9:22   ` [PATCH 5/9] drm/amdgpu:cleanup in_sriov_reset and lock_reset Monk Liu
     [not found]     ` <1508923343-24404-6-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-26  7:14       ` Christian König
2017-10-25  9:22   ` [PATCH 6/9] drm/amdgpu:cleanup ucode_init_bo Monk Liu
     [not found]     ` <1508923343-24404-7-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-26  7:17       ` Christian König
2017-10-25  9:22   ` [PATCH 7/9] drm/amdgpu:block kms open during gpu_reset Monk Liu
     [not found]     ` <1508923343-24404-8-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-26  7:18       ` Christian König
     [not found]         ` <46bc9872-0bd7-c2b7-4879-6cab5789f252-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-26  8:17           ` Liu, Monk
     [not found]             ` <BLUPR12MB0449D707ECAE76FFAA13C46684450-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-26 10:54               ` Christian König
     [not found]                 ` <06a765e3-971e-698c-6d07-1dee69c1e0c8-5C7GfCeVMHo@public.gmane.org>
2017-10-26 11:08                   ` Liu, Monk
     [not found]                     ` <BLUPR12MB044997E32FD02ACDBD978C7084450-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-26 15:15                       ` Christian König [this message]
     [not found]                         ` <46a5317f-e606-5cfe-82c9-46df64818435-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-10-30  3:47                           ` Liu, Monk
     [not found]                             ` <BLUPR12MB0449DD842E46A942CF53484084590-7LeqcoF/hwpTIQvHjXdJlwdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-30  7:37                               ` Christian König
     [not found]                                 ` <f2213f71-9280-bb51-5283-5349878956f7-5C7GfCeVMHo@public.gmane.org>
2017-10-30  7:54                                   ` Liu, Monk
     [not found]                                     ` <SN1PR12MB04629FAC65DFD5F133D2E34484590-z7L1TMIYDg7VaWpRXmIMygdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-10-30  9:20                                       ` Christian König
2017-10-25  9:22   ` [PATCH 8/9] drm/amdgpu/sriov:fix memory leak in psp_load_fw Monk Liu
     [not found]     ` <1508923343-24404-9-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-26  7:21       ` Christian König
2017-10-25  9:22   ` [PATCH 9/9] drm/amdgpu:fix random missing of FLR NOTIFY Monk Liu
     [not found]     ` <1508923343-24404-10-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-10-26  7:22       ` 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=46a5317f-e606-5cfe-82c9-46df64818435@gmail.com \
    --to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=Christian.Koenig-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox