Re: [PATCH] drm/ttm/nouveau: don't call tt destroy callback on alloc failure.

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

 



Am 29.07.20 um 02:08 schrieb Dave Airlie:
[SNIP]
Landed this in drm-next as well.

By the way there is another design bug in TTM which only affects Nouveau. See ttm_mem_io_reserve_vm() and ttm_mem_io_free_vm().


What happens is that as soon as you have an userspace VM mapping the BO ends up on the LRU and a flag noting that so that we don't free the VM reference twice.

Additional to that we have a reference count to avoid calling the io_mem_reserve and io_mem_free callbacks unbalanced if there are both userspace VM mappings and kernel mappings for CPU copies of BOs or kmap() etc...


But this design is complete nonsense.

What we need instead is some handling which prevents adding the io_mem to the LRU as soon as there are any kernel mappings, because we can't restore those using a fault.

I already tried to move the whole handling into Nouveau itself, so that we can properly fix this up there. But Ben reported that my only compile tested patches don't work and without hardware I can't finish them up.


Regards,
Christian.
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux