The vaild flag doesn't take effect in this function.That's irrelevant. See what amdgpu_vm_update_ptes() does is to first determine the fragment size: amdgpu_vm_fragment(params, frag_start, end, flags, &frag, &frag_end); Then we walk down the tree: amdgpu_vm_pt_start(adev, params->vm, start, &cursor); And make sure that the page tables covering the address range are actually allocated: r = amdgpu_vm_alloc_pts(params->adev, params->vm, &cursor); Then we update the tables with the flags and addresses and free up subsequent tables in the case of huge pages or freed up areas: /* Free all child entries */ This is the maximum you can free, cause all other page tables are not completely covered by the range and so potentially still in use. And I have the strong suspicion that this is what your patch is actually doing wrong. In other words you are also freeing page tables which are only partially covered by the range and so potentially still in use. Since we don't have any tracking how many entries in a page table are currently valid and how many are invalid we actually can't implement what you are trying to do here. So the patch is definitely somehow broken. Regards, Christian. Am 30.10.19 um 17:55 schrieb Huang, JinHuiEric:
|
_______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx