Re: [PATCH v2 2/2] drm/amdgpu: track bo memory stats at runtime

2024-09-10 Thread Christian König
Am 10.09.24 um 19:40 schrieb Li, Yunxiang (Teddy): [Public] Ok that looks extremely ugly. Please just add a separate function and call that from the TTM move function. Should I still remove the adev argument? It is never used and causes a few call sites having to find an adev unnecessarily.

RE: [PATCH v2 2/2] drm/amdgpu: track bo memory stats at runtime

2024-09-10 Thread Li, Yunxiang (Teddy)
[Public] > Ok that looks extremely ugly. Please just add a separate function and call > that > from the TTM move function. Should I still remove the adev argument? It is never used and causes a few call sites having to find an adev unnecessarily. > Please either drop that or compare each memor

Re: [PATCH v2 2/2] drm/amdgpu: track bo memory stats at runtime

2024-09-10 Thread Christian König
Am 24.06.24 um 16:08 schrieb Yunxiang Li: Before, every time fdinfo is queried we try to lock all the BOs in the VM and calculate memory usage from scratch. This works okay if the fdinfo is rarely read and the VMs don't have a ton of BOs. If either of these conditions is not true, we get a massiv

RE: [PATCH v2 2/2] drm/amdgpu: track bo memory stats at runtime

2024-06-24 Thread Li, Yunxiang (Teddy)
[Public] I'm not happy with the new helper names, and not quite satisfied with the function arguments either. But it's what I got right now, would appreciate it if anyone got better ideas. Teddy

[PATCH v2 2/2] drm/amdgpu: track bo memory stats at runtime

2024-06-24 Thread Yunxiang Li
Before, every time fdinfo is queried we try to lock all the BOs in the VM and calculate memory usage from scratch. This works okay if the fdinfo is rarely read and the VMs don't have a ton of BOs. If either of these conditions is not true, we get a massive performance hit. In this new revision, we