[PATCH 00/13] shadow page table support

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

 



Am 26.07.2016 um 10:41 schrieb zhoucm1:
>
>
> On 2016å¹´07æ??26æ?¥ 16:27, Christian König wrote:
>> Am 26.07.2016 um 07:33 schrieb zhoucm1:
>>>
>>>
>>> On 2016å¹´07æ??26æ?¥ 10:40, zhoucm1 wrote:
>>>> 1. We add an optional "shadow" flag so that when a BO in VRAM is 
>>>> allocated we also allocate a shadow BO in GART.
>>>>
>>>> 2. We have another "backup" flag that says on the next command 
>>>> submission the BO is backed up from VRAM to GART before that 
>>>> submission.
>>>>
>>>> 3. We set the shadow flag for VM PD/PT BOs and every time we modify 
>>>> them set the backup flag so they get backed up on next CS.
>>>>
>>>> 4. We add an IOCTL to allow setting the backup flag from userspace 
>>>> so that we can trigger another backup even after the first CS. 
>>> When I'm trying it and thinking more, a general shadow BO indeed be 
>>> a sense way, but backup flag seems not necessary, mainly two reasons:
>>> 1. we cannot make sure backup job is completed when gpu reset happens.
>>
>> Correct, but we can't guarantee that for VM updates either.
> Since we directly fill pte info to shadow BO, not copy from VRAM to 
> GTT. Which ensures shadow BO content always is right, event these jobs 
> don't complete when gpu reset, but after gpu reset, we can sync these 
> jobs, and then copy GTT to VRAM. The similar case is also same for 
> shader BOs. So we should directly fill the shadow BOs.

I see what you mean. The PTE update and the shadow update must be one 
operation for this to be always consistent.

Alternatively you could flip the order and do the update on the shadow 
first and then copy the result to the real one.

BTW: We should make this an optional feature, cause it will certainly 
use a lot of memory and computation resources.

Regards,
Christian.

>
> Regards,
> David Zhou
>>
>>> 2. backup flag is to copy the whole BO, which seems overhead. If we 
>>> update shadow BO along with BO in real time, e.g. PD/PT, we could 
>>> only update some ptes not the entire BO.
>>
>> How about using a begin/end range of which parts of the BO needs to 
>> be backed up instead of a flag?
>>
>>> So can we assume shadow BO always needed to backup if shadow flag is 
>>> set?
>>
>> For shader BOs clearly not a good idea because they are rarely update 
>> and so backing them up every time would be a huge overhead.
>>
>> Regards,
>> Christian.
>>
>>>
>>> Regards,
>>> David Zhou
>>
>>
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx




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

  Powered by Linux