On 10/22/2018 08:35 PM, Christian König wrote:
Am 22.10.18 um 08:45 schrieb Zhang, Jerry(Junwei):
A question in ttm_bo.c
[SNIP]
int ttm_bo_device_release(struct ttm_bo_device *bdev)
{
@@ -1623,18 +1620,25 @@ int ttm_bo_device_release(struct
ttm_bo_device *bdev)
drm_vma_offset_manager_destroy(&bdev->vma_manager);
+ if (!ret)
+ ttm_bo_global_release();
if ttm_bo_clean_mm() fails, it will skip ttm_bo_global_release().
When will it be called?
Never.
Shall add it to delayed work? or maybe we could release it directly?
No, when ttm_bo_device_release() fails somebody is trying to unload a
driver while this driver still has memory allocated.
In this case BO accounting should not be released because we should
make sure that all the leaked memory is still accounted.
In this case, it's rather a bug to fix then.
Thanks to explain it .
looks fine for me, feel free to add
Reviewed-by: Junwei Zhang <Jerry.Zhang@xxxxxxx>
Jerry
Christian.
Regards,
Jerry
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx