On Wed, 2024-07-03 at 15:40 +0200, Thomas Hellström wrote: > Hi, Christian, > > On Wed, 2024-07-03 at 15:25 +0200, Christian König wrote: > > Hi guys, > > > > We recently ran into a problem with deadlocks during eviction and > > while back Thomas worked on a patch set which was going into the > > direction of solving this. > > > > So I simplified it to just the functionality needed to resolve this > > issue at. The resulting patch set is just the initial first step of > > using drm_exec in TTM for locking BOs during eviction. > > > > Should a deadlock happen the drm_exec object is now used to resolve > > it and prelock the contended object. This approach solves this the > > ENOMEM issue on contending evictions quite nicely. > > > > Please review and comment, > > Christian. > > Overall it looks sane, but I think it makes sense to review and land > the part of the shrinker series first that touches this eviction path > and gets rid of a lot of code that's hard to understand and > simplifies > the locking a lot. (That part doesn't touch drm_exec), and it has > been > pending reviews for some time. > > I don't think it's correct to bypass that. Then we could work out the > drm_exec implications. It's https://patchwork.freedesktop.org/series/131815/ And in particular patch 7 there brings in the restartable LRU functionality and sipmlifies eviction immensely and would make the usage of this patchset's rudimentary drm_exec support easier to understand and review. /Thomas > > /Thomas > > > > > > >