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

Li, Yunxiang (Teddy) Yunxiang.Li at amd.com
Tue Sep 10 17:40:30 UTC 2024


[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 memory stat variable separately.
> Byte by byte compares are really frowned upon.

I think it's probably a good idea to check for zero here, otherwise there's no way for us to know if accounting have some bug in it. I'll change it to check each field separately (maybe break it out into a small helper so it's out of the way?)

Teddy


More information about the amd-gfx mailing list