Re: Using drm_exec for TTMs BO eviction

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

 



On Wed, 2024-07-03 at 16:30 +0200, Christian König wrote:
> Am 03.07.24 um 15:59 schrieb Thomas Hellström:
> > On Wed, 2024-07-03 at 15:53 +0200, Thomas Hellström wrote:
> > > 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.
> 
> That's actually exactly what I wanted to avoid.

> 
> > > > 
> > > > 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.
> 
> Yeah, seen Mathews comments on that stuff.
> 
> Looked like 99% sane to me the last time I checked, the only thing
> I'm 
> still not very keen at is still the bulk and cursor interaction.
> 
> > > 
> > > /Thomas
> > Hm. I actually think all review comments have been sorted out up to
> > that patch, so what's missing is a resend of the new version, RB
> > from
> > Matt and Review / Ack from you, then that part could be partially
> > merged.
> 
> Going to take another look at that.

I'll resend latest version.
/Thomas


> 
> Regards,
> Christian.
> 
> > 
> > /Thomas
> > 
> > 
> > 
> > > 
> > > > /Thomas
> > > > 
> > > > 
> > > > > 
> 





[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