[PATCH 00/19] shadow page table support V2

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

 




On 2016å¹´08æ??08æ?¥ 19:04, Christian König wrote:
> Apart from that patch #1:
>> + amdgpu_ttm_placement_init(adev, &placement,
>> +                  placements, AMDGPU_GEM_DOMAIN_GTT,
>> +                  AMDGPU_GEM_CREATE_CPU_GTT_USWC);
>> +
>> +    return amdgpu_bo_create_restricted(adev, size, byte_align, true,
>> +                       AMDGPU_GEM_DOMAIN_GTT,
>> +                       AMDGPU_GEM_CREATE_CPU_GTT_USWC,
>> +                       NULL, &placement,
>> +                       bo->tbo.resv,
>> +                       &bo->shadow);
> You need to set bo->shadow->parent to the parent BO when you use the 
> reservation object here. See the VM code on how to do this, otherwise 
> TTM could free the parent reservation object first and the crash when 
> it wants to free the shadow.
I've tried to add parent for shadow bo, I trouble how to free shadow bo.
My old though is the life cycle of shadow bo is same as parent. That 
means parent bo refers shadow bo when initialization, unref shadow bo 
when BO is freeing, other people cannot refer shadow bo.

So if we set bo->shadow->parent and reference it, then the bo cannot be 
freed.

Regards,
David Zhou
>
> Additional to that do we really need the placement here? That looks 
> quite odd.



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux