RE: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved

2024-07-19 Thread YuanShang Mao (River)
: Re: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved On 2024-07-15 08:39, Christian König wrote: > Hi Felix, > > yes that is a perfectly expected consequence. > > The last time we talked about it the problem to solve this was that > amdgpu_vm_sdma_prepare() couldn'

Re: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved

2024-07-17 Thread Felix Kuehling
2024 10:55 AM To: Christian König Cc: Huang, Trigger ; amd-gfx@lists.freedesktop.org Subject: RE: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved We need to make sure that all BOs of an active kfd process validated. Moving buffer will trigger process eviction. If mark it as invalided b

Re: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved

2024-07-15 Thread Christian König
M To: Christian König Cc: Huang, Trigger ; amd-gfx@lists.freedesktop.org Subject: RE: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved We need to make sure that all BOs of an active kfd process validated. Moving buffer will trigger process eviction. If mark it as invalided before process eviction, rela

Re: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved

2024-07-12 Thread Felix Kuehling
will trigger process eviction. >> If mark it as invalided before process eviction, related kfd process is >> still active and may attempt to access this invalidated BO. >> >> Agree with Trigger. Seems kfd eviction should been synced to move notify, >> not the move ac

Re: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved

2024-07-12 Thread Christian König
Christian König Cc: Huang, Trigger ; amd-gfx@lists.freedesktop.org Subject: RE: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved We need to make sure that all BOs of an active kfd process validated. Moving buffer will trigger process eviction. If mark it as invalided before process evict

Re: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved

2024-07-12 Thread Christian König
been synced to move notify, not the move action. Thanks River -Original Message- From: Christian König Sent: Thursday, July 11, 2024 8:39 PM To: Huang, Trigger ; YuanShang Mao (River) ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved

RE: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved

2024-07-12 Thread YuanShang Mao (River)
König Cc: Huang, Trigger ; amd-gfx@lists.freedesktop.org Subject: RE: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved We need to make sure that all BOs of an active kfd process validated. Moving buffer will trigger process eviction. If mark it as invalided before process eviction, related kfd process

RE: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved

2024-07-11 Thread YuanShang Mao (River)
: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved Yeah, completely agree. This patch doesn't really make sense. Please explain why you would want to do this? Regards, Christian. Am 11.07.24 um 13:56 schrieb Huang, Trigger: > [AMD Official Use Only - AMD Internal Distribution Only]

Re: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved

2024-07-11 Thread Christian König
Sent: Thursday, July 11, 2024 5:10 PM To: amd-gfx@lists.freedesktop.org Cc: YuanShang Mao (River) ; YuanShang Mao (River) Subject: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking

RE: [PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved

2024-07-11 Thread Huang, Trigger
BO while it is being moved. Thanks, Trigger > -Original Message- > From: amd-gfx On Behalf Of > YuanShang > Sent: Thursday, July 11, 2024 5:10 PM > To: amd-gfx@lists.freedesktop.org > Cc: YuanShang Mao (River) ; YuanShang Mao > (River) > Subject: [PATCH] drm/a

[PATCH] drm/amdgpu: Mark amdgpu_bo as invalid after moved

2024-07-11 Thread YuanShang
It leads to race condition if amdgpu_bo is marked as invalid before it is really moved. Signed-off-by: YuanShang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/a