mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: increase sync-unmap timeout to 100ms
- sync-unmap timeout was observed intermittently. so doubled the timeout value. - also check ref count after last round of sleep. The polling could succeed during the last sleep. - fix error print on timeout. Bug 200434475 Change-Id: If821dfaca9b86873711f436645523dc49a5eba34 Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1828562 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
57e8a2417b
commit
a4065effdc
@@ -1179,9 +1179,9 @@ static int nvgpu_vm_unmap_sync_buffer(struct vm_gk20a *vm,
|
||||
nvgpu_mutex_release(&vm->update_gmmu_lock);
|
||||
|
||||
/*
|
||||
* 500ms second timer.
|
||||
* 100ms timer.
|
||||
*/
|
||||
nvgpu_timeout_init(vm->mm->g, &timeout, 50, NVGPU_TIMER_CPU_TIMER);
|
||||
nvgpu_timeout_init(vm->mm->g, &timeout, 100, NVGPU_TIMER_CPU_TIMER);
|
||||
|
||||
do {
|
||||
if (nvgpu_atomic_read(&mapped_buffer->ref.refcount) == 1) {
|
||||
@@ -1189,9 +1189,11 @@ static int nvgpu_vm_unmap_sync_buffer(struct vm_gk20a *vm,
|
||||
}
|
||||
nvgpu_msleep(10);
|
||||
} while (nvgpu_timeout_expired_msg(&timeout,
|
||||
"sync-unmap failed on 0x%llx") == 0);
|
||||
"sync-unmap failed on 0x%llx",
|
||||
mapped_buffer->addr) == 0);
|
||||
|
||||
if (nvgpu_timeout_expired(&timeout)) {
|
||||
if (nvgpu_atomic_read(&mapped_buffer->ref.refcount) != 1 &&
|
||||
nvgpu_timeout_expired(&timeout)) {
|
||||
ret = -ETIMEDOUT;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user