From: "Christian König" <ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Samuel Pitoiset
<samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Alex Deucher
<alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: amd-gfx list <amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH] drm/amdgpu: fix huge page handling on Vega10
Date: Tue, 13 Nov 2018 09:14:44 +0100 [thread overview]
Message-ID: <34255c9f-b167-f8bc-7ce9-e1e75123cef4@gmail.com> (raw)
In-Reply-To: <f460f333-e31c-2347-4d96-dd04d7416451-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Am 12.11.18 um 22:45 schrieb Samuel Pitoiset:
>
>
> On 11/12/18 6:16 PM, Alex Deucher wrote:
>> On Mon, Nov 12, 2018 at 12:09 PM Christian König
>> <ckoenig.leichtzumerken@gmail.com> wrote:
>>>
>>> We accidentially set the huge flag on the parent instead of the childs.
>>> This caused some VM faults under memory pressure.
>>>
>>> Signed-off-by: Christian König <christian.koenig@amd.com>
>
> Yes, this fixes GPU hangs with F12017 and RoTR with RADV.
>
> Thanks for the fix Christian!
Just FYI I take sentences as this as a "Tested-by: Samuel Pitoiset
<samuel.pitoiset@gmail.com>".
So if you don't want your mail address to show up in a kernel commit
start better say so before Alex pushes it upstream :)
Christian.
>
>>
>> Acked-by: Alex Deucher <alexander.deucher@amd.com>
>>
>>> ---
>>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 18 ++++++++++--------
>>> 1 file changed, 10 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>> index 352b30409060..dad0e2342df9 100644
>>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
>>> @@ -1632,13 +1632,6 @@ static int amdgpu_vm_update_ptes(struct
>>> amdgpu_pte_update_params *params,
>>> continue;
>>> }
>>>
>>> - /* First check if the entry is already handled */
>>> - if (cursor.pfn < frag_start) {
>>> - cursor.entry->huge = true;
>>> - amdgpu_vm_pt_next(adev, &cursor);
>>> - continue;
>>> - }
>>> -
>>> /* If it isn't already handled it can't be a huge
>>> page */
>>> if (cursor.entry->huge) {
>>> /* Add the entry to the relocated list to
>>> update it. */
>>> @@ -1701,8 +1694,17 @@ static int amdgpu_vm_update_ptes(struct
>>> amdgpu_pte_update_params *params,
>>> }
>>> } while (frag_start < entry_end);
>>>
>>> - if (frag >= shift)
>>> + if (amdgpu_vm_pt_descendant(adev, &cursor)) {
>>> + /* Mark all child entries as huge */
>>> + while (cursor.pfn < frag_start) {
>>> + cursor.entry->huge = true;
>>> + amdgpu_vm_pt_next(adev, &cursor);
>>> + }
>>> +
>>> + } else if (frag >= shift) {
>>> + /* or just move on to the next on the same
>>> level. */
>>> amdgpu_vm_pt_next(adev, &cursor);
>>> + }
>>> }
>>>
>>> return 0;
>>> --
>>> 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
next prev parent reply other threads:[~2018-11-13 8:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-12 17:09 [PATCH] drm/amdgpu: fix huge page handling on Vega10 Christian König
[not found] ` <20181112170942.10674-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-11-12 17:16 ` Alex Deucher
[not found] ` <CADnq5_MORq4h3zMq_YF+_8HjMyqn61AweLxwYfr+oo4kfkxdfA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-11-12 21:45 ` Samuel Pitoiset
[not found] ` <f460f333-e31c-2347-4d96-dd04d7416451-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-11-13 8:14 ` Christian König [this message]
[not found] ` <34255c9f-b167-f8bc-7ce9-e1e75123cef4-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-11-13 9:08 ` Samuel Pitoiset
2018-11-12 23:50 ` Kuehling, Felix
[not found] ` <076d08d0-bdf8-4c59-88aa-0d45383e66cb-5C7GfCeVMHo@public.gmane.org>
2018-11-13 7:47 ` 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=34255c9f-b167-f8bc-7ce9-e1e75123cef4@gmail.com \
--to=ckoenig.leichtzumerken-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
--cc=samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@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