drm/amdkfd: flag added to handle errors from svm validate and map
If a return error is raised during validation and mapping of a prange, this flag is set. It is a rare occurrence, but it could happen when `amdgpu_hmm_range_get_pages_done` returns true. In such cases, the caller should retry. However, it is important to ensure that the prange is updated correctly during the retry. Signed-off-by: Alex Sierra <alex.sierra@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
c6a64ad9b7
commit
c22b044070
|
@ -809,7 +809,7 @@ svm_range_is_same_attrs(struct kfd_process *p, struct svm_range *prange,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return !prange->is_error_flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1691,6 +1691,7 @@ unlock_out:
|
||||||
unreserve_out:
|
unreserve_out:
|
||||||
svm_range_unreserve_bos(ctx);
|
svm_range_unreserve_bos(ctx);
|
||||||
|
|
||||||
|
prange->is_error_flag = !!r;
|
||||||
if (!r)
|
if (!r)
|
||||||
prange->validate_timestamp = ktime_get_boottime();
|
prange->validate_timestamp = ktime_get_boottime();
|
||||||
|
|
||||||
|
|
|
@ -134,6 +134,7 @@ struct svm_range {
|
||||||
DECLARE_BITMAP(bitmap_aip, MAX_GPU_INSTANCE);
|
DECLARE_BITMAP(bitmap_aip, MAX_GPU_INSTANCE);
|
||||||
bool validated_once;
|
bool validated_once;
|
||||||
bool mapped_to_gpu;
|
bool mapped_to_gpu;
|
||||||
|
bool is_error_flag;
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline void svm_range_lock(struct svm_range *prange)
|
static inline void svm_range_lock(struct svm_range *prange)
|
||||||
|
|
Loading…
Reference in New Issue