I tested it that it saves a lot of vram on KFD big buffer stress test. I think there are two reasons:
1. Calling amdgpu_vm_update_ptes() during unmapping will allocate unnecessary pts, because there is no flag to determine if the VA is mapping or unmapping in function
amdgpu_vm_update_ptes(). It saves the most of memory.
2. Intentionally removing those unmapping pts is logical expectation, although it is not removing so much pts.
Regards,
Eric
On 2019-10-30 11:57 a.m., Koenig, Christian wrote:
Well it does free the lower level, and that is already causing problems (that's why I added the reserved space).
What we don't do is freeing the higher levels.
E.g. when you free a 2MB BO we free the lowest level, if we free a 1GB BO we free the two lowest levels etc...
The problem with freeing the higher levels is that you don't know who is also using this. E.g. we would need to check all entries when we unmap one.
It's simply not worth it for a maximum saving of 2MB per VM.
Writing this I'm actually wondering how you ended up in this issue? There shouldn't be much savings from this.
Regards,
Christian.
|
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx