All of lore.kernel.org
 help / color / mirror / Atom feed
* When to kmap PT BOs?
@ 2018-08-29 22:30 Felix Kuehling
       [not found] ` <7a9aa339-e771-c667-4eb8-6f30c7c37c15-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Kuehling @ 2018-08-29 22:30 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Christian König

Hi,

Currently PT BOs are kmapped in amdgpu_vm_update_directories. That
means, to avoid kernel oopses after page table evictions, I need to call
amdgpu_vm_update_directories before calling amdgpu_vm_bo_update.

But amdgpu_vm_bo_update can also move PTs on the vm->relocated list
during huge page handling. That means I also need to call
amdgpu_vm_update_directories after amdgpu_vm_bo_update.

I think a better solution is to move kmapping out of
amdgpu_vm_update_directories. But I'm not sure what's the right place
for it. Any suggestions? For a quick fix for kernel oopses after page
table evictions in the ROCm 1.9 release I'll call
amdgpu_vm_update_directories twice. If there are no new entries on the
vm->relocated lists, the second call won't add much overhead anyway.

Thanks,
  Felix

-- 
F e l i x   K u e h l i n g
PMTS Software Development Engineer | Linux Compute Kernel
1 Commerce Valley Dr. East, Markham, ON L3T 7X6 Canada
(O) +1(289)695-1597
   _     _   _   _____   _____
  / \   | \ / | |  _  \  \ _  |
 / A \  | \M/ | | |D) )  /|_| |
/_/ \_\ |_| |_| |_____/ |__/ \|   facebook.com/AMD | amd.com

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: When to kmap PT BOs?
       [not found] ` <7a9aa339-e771-c667-4eb8-6f30c7c37c15-5C7GfCeVMHo@public.gmane.org>
@ 2018-08-30  4:49   ` Zhang, Jerry (Junwei)
  2018-08-30  6:50   ` Christian König
  1 sibling, 0 replies; 3+ messages in thread
From: Zhang, Jerry (Junwei) @ 2018-08-30  4:49 UTC (permalink / raw)
  To: Felix Kuehling, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	Christian König

On 08/30/2018 06:30 AM, Felix Kuehling wrote:
> Hi,
>
> Currently PT BOs are kmapped in amdgpu_vm_update_directories. That
> means, to avoid kernel oopses after page table evictions, I need to call
> amdgpu_vm_update_directories before calling amdgpu_vm_bo_update.
>
> But amdgpu_vm_bo_update can also move PTs on the vm->relocated list
> during huge page handling. That means I also need to call
> amdgpu_vm_update_directories after amdgpu_vm_bo_update.

Not very familiar with huge page handling.

But from code, maybe we can kmap the PTE entry right here.
Then it will update current non-huge page PTE later in amdgpu_vm_update_ptes().

Regards,
Jerry

>
> I think a better solution is to move kmapping out of
> amdgpu_vm_update_directories. But I'm not sure what's the right place
> for it. Any suggestions? For a quick fix for kernel oopses after page
> table evictions in the ROCm 1.9 release I'll call
> amdgpu_vm_update_directories twice. If there are no new entries on the
> vm->relocated lists, the second call won't add much overhead anyway.
>
> Thanks,
>    Felix
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: When to kmap PT BOs?
       [not found] ` <7a9aa339-e771-c667-4eb8-6f30c7c37c15-5C7GfCeVMHo@public.gmane.org>
  2018-08-30  4:49   ` Zhang, Jerry (Junwei)
@ 2018-08-30  6:50   ` Christian König
  1 sibling, 0 replies; 3+ messages in thread
From: Christian König @ 2018-08-30  6:50 UTC (permalink / raw)
  To: Felix Kuehling, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	Christian König

Hi Felix,

ah, crap you are right.

I moved the kmap to amdgpu_vm_update_directories() because I thought 
that it would be cleaner to have that closer where it is used.

But that sounds like it doesn't work as intended. Going to revert that 
patch.

Thanks,
Christian.

Am 30.08.2018 um 00:30 schrieb Felix Kuehling:
> Hi,
>
> Currently PT BOs are kmapped in amdgpu_vm_update_directories. That
> means, to avoid kernel oopses after page table evictions, I need to call
> amdgpu_vm_update_directories before calling amdgpu_vm_bo_update.
>
> But amdgpu_vm_bo_update can also move PTs on the vm->relocated list
> during huge page handling. That means I also need to call
> amdgpu_vm_update_directories after amdgpu_vm_bo_update.
>
> I think a better solution is to move kmapping out of
> amdgpu_vm_update_directories. But I'm not sure what's the right place
> for it. Any suggestions? For a quick fix for kernel oopses after page
> table evictions in the ROCm 1.9 release I'll call
> amdgpu_vm_update_directories twice. If there are no new entries on the
> vm->relocated lists, the second call won't add much overhead anyway.
>
> Thanks,
>    Felix
>

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-30  6:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-29 22:30 When to kmap PT BOs? Felix Kuehling
     [not found] ` <7a9aa339-e771-c667-4eb8-6f30c7c37c15-5C7GfCeVMHo@public.gmane.org>
2018-08-30  4:49   ` Zhang, Jerry (Junwei)
2018-08-30  6:50   ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.