FAILED: patch "[PATCH] drm/amdgpu: fix huge page handling on Vega10" failed to apply to 4.19-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
c1a17777eb45d9f3821f35e9869c0a08cd2e664eMon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20K=C3=B6nig?= <[email protected]>
Date: Mon, 12 Nov 2018 18:08:31 +0100
Subject: [PATCH] drm/amdgpu: fix huge page handling on Vega10
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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 <[email protected]>
Acked-by Alex Deucher <[email protected]>
Tested-by Samuel Pitoiset <[email protected]>
Reviewed-by Felix Kuehling <[email protected]>
Signed-off-by Alex Deucher <[email protected]>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +10 -8
@@ -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 ;