On 03.09.25 04:52, Liang, Prike wrote:
>> +     ret = amdgpu_vm_update_pdes(adev, vm, false);
>> +     if (ret)
>> +             goto unlock_all;
> 
> Do we need to create a sync point for syncing the VM PD/PT/PET update, and 
> ensure
> all the updates done before attach the eviction fence?

Oh, good point! Yes we need to wait for the page table updates to finish.

Going to fix that.

>> +     /* We can only trust prev->next while holding the lock */
>> +     spin_lock(&vm->status_lock);
>> +     while (!list_is_head(prev->next, &vm->done)) {
> Can here use the list_for_each_entry_safe() for simplifying the done list 
> walk loop?

No, we need to use prev as anchor here since the list element can be moved from 
the done to the invalidated list while we try to lock them.

Regards,
Christian. 

Reply via email to