[PATCH v3] drm/amdgpu: Add debugfs entry for printing VM info

Christian König christian.koenig at amd.com
Tue Oct 13 17:04:21 UTC 2020


[SNIP]
> Thinking a bit more about it, when you also look at
> bo->preferred_domains and compare that with the current domain you can
> also figure out if a BO is swapped out or not.
>
> Christian.
>
> Thanks Christian for quick review/help and details. Summarizing your inputs  and some queries:
> 1. Adding BO from all the lists will give the total amount of memory allocated by this PID

Well you need to add the "done" list again, but otherwise that's correct.

> 2.  We can also print bo->preferred domain to check what user asked for and where it is currently.
> But we can have a situation where user asked for VRAM but allowed domain added GTT and we eventually
> Allocated BO in GTT.

Yes, that is correct as well.

> So do we update bo->preferred_domain in that scenario??

No, bo->preferred_domains always reflect what userspace asked for.

> 3. What will be the scenario in which we add BO to the Reloacted/Moved/Idle?? How it is different from Evicted??

We differentiate BOs by per VM and normal. Per VM are for example page 
tables and BOs which can't be shared between processes. Those you will 
find on the relocated/moved/idle list.

"Normal" BOs can be shared between processes and have a separate lock. 
Those you will find on the invalidated/done list.

Regards,
Christian.

>
> Regards,
> Madhav
>
>> Christian.
>>
>>> Regards,
>>> Mihir
>>>> Thanks,
>>>> Mihir
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx



More information about the amd-gfx mailing list