From: "Zhang, Jerry (Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: zhoucm1 <zhoucm1-5C7GfCeVMHo@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH] drm/amdgpu: fix list not initialized
Date: Thu, 19 Apr 2018 12:32:19 +0800 [thread overview]
Message-ID: <5AD81BD3.1040401@amd.com> (raw)
In-Reply-To: <337da6ff-3950-2dad-4c06-b5d72b3ff397-5C7GfCeVMHo@public.gmane.org>
On 04/19/2018 10:30 AM, zhoucm1 wrote:
>
>
> On 2018年04月19日 09:48, Zhang, Jerry (Junwei) wrote:
>> On 04/18/2018 06:37 PM, Chunming Zhou wrote:
>>> Otherwise, cpu stuck for 22s with kernel panic.
>>>
>>> Change-Id: I5b87cde662a4658c9ab253ba88d009c9628a44ca
>>> Signed-off-by: Chunming Zhou <david1.zhou@amd.com>
>>> ---
>>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +--
>>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>> index f0fbc331aa30..7131ad13c5b5 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>> @@ -1563,10 +1563,9 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev,
>>> * the evicted list so that it gets validated again on the
>>> * next command submission.
>>> */
>>> + list_del_init(&bo_va->base.vm_status);
>>> if (!(bo->preferred_domains & amdgpu_mem_type_to_domain(mem_type)))
>>> list_add_tail(&bo_va->base.vm_status, &vm->evicted);
>>> - else
>>> - list_del_init(&bo_va->base.vm_status);
>>> } else {
>>> list_del_init(&bo_va->base.vm_status);
>>> }
>> We may simplify the logic as below.
>> How do you think?
>>
>> list_del_init(&bo_va->base.vm_status);
>> unsigned mem_type = bo->tbo.mem.mem_type;
>> /* If the BO is not in its preferred location add it back to
>> * the evicted list so that it gets validated again on the
>> * next command submission.
>> */
>> if ((bo && bo->tbo.resv == vm->root.base.bo->tbo.resv) &&
>> (!(bo->preferred_domains & amdgpu_mem_type_to_domain(mem_type))))
>> list_add_tail(&bo_va->base.vm_status, &vm->evicted);
> Looks good, but I already pushed that patch just now. if you like, you can make
> a simplify patch with your idea.
Sure, I will.
Jerry
>
> Regards,
> David Zhou
>>
>> Jerry
>>
>>>
>> _______________________________________________
>> 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
prev parent reply other threads:[~2018-04-19 4:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-18 10:37 [PATCH] drm/amdgpu: fix list not initialized Chunming Zhou
[not found] ` <20180418103710.17421-1-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2018-04-18 11:17 ` Christian König
2018-04-19 1:48 ` Zhang, Jerry (Junwei)
[not found] ` <5AD7F558.5060105-5C7GfCeVMHo@public.gmane.org>
2018-04-19 2:30 ` zhoucm1
[not found] ` <337da6ff-3950-2dad-4c06-b5d72b3ff397-5C7GfCeVMHo@public.gmane.org>
2018-04-19 4:32 ` Zhang, Jerry (Junwei) [this message]
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=5AD81BD3.1040401@amd.com \
--to=jerry.zhang-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=zhoucm1-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