dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* Re: [Intel-gfx] [PATCH 11/66] drm/i915: Preallocate stashes for vma page-directories
       [not found]         ` <159655010494.4193.7855959524648425177@build.alporthouse.com>
@ 2020-08-04 16:14           ` Daniel Vetter
  0 siblings, 0 replies; only message in thread
From: Daniel Vetter @ 2020-08-04 16:14 UTC (permalink / raw)
  To: Chris Wilson, dri-devel, Christian König, Dave Airlie
  Cc: Thomas Hellström, intel-gfx

On Tue, Aug 4, 2020 at 4:08 PM Chris Wilson <chris@chris-wilson.co.uk> wrote:
>
> Quoting Thomas Hellström (Intel) (2020-07-30 13:28:19)
> >
> > On 7/28/20 4:50 PM, Chris Wilson wrote:
> > >
> > > It's in the user critical path (the shortest path to perform their
> > > sequence of operations), but it's before the dma-fence itself. I say
> > > that's a particularly nasty false claim that it is not on the critical
> > > path, but being where it is circumvents the whole argument.
> > >
> >
> > Couldn't the following situation happen?
> >
> > 1. CS spawns userptr pinning work.
> > 2. CS creates and publishes a DMA-fence that depends on that pinning work.
>
> There's a break before 2 in that we do not publish a dma-fence on pending
> userptr work. There's no async wait on the userptr, if the pages are not
> available at the point of acquire, we hit an -EAGAIN, and take the
> flush_workqueue path until we stop hitting -EAGAIN.
>
> That is as painful as it sounds, and I claim that sitting and spinning in
> a user path is no better in terms of critical path than having it inside
> the dma-fence section. However, with this pretense we do not violate that
> rule.

You trade a deadlock for a livelock, and the livelock is limited fully
to the offending process using (too much) userptr, and the user can
break out of it with ^C. That's a fairly significant difference. Don't
overruse userptr still applies.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-04 16:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200715115147.11866-1-chris@chris-wilson.co.uk>
     [not found] ` <20200715115147.11866-11-chris@chris-wilson.co.uk>
     [not found]   ` <dabc6756-3ba8-ee58-ca6c-e2ae2f0227ac@shipmail.org>
     [not found]     ` <159594782797.665.3798858958968044733@build.alporthouse.com>
     [not found]       ` <1804e5f6-7a1a-999b-cdfd-50903cc3cc1d@shipmail.org>
     [not found]         ` <159655010494.4193.7855959524648425177@build.alporthouse.com>
2020-08-04 16:14           ` [Intel-gfx] [PATCH 11/66] drm/i915: Preallocate stashes for vma page-directories Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).