Re: [PATCH 4/5] drm/ttm: initialize globals during device init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Christian.


Regards,
Jerry

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux