From: Damien Lespiau <damien.lespiau@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org, Mika Kuoppala <mika.kuoppala@intel.com>
Subject: Re: [PATCH] drm/i915: Use uninterruptible mutex_lock for userptr bo creation
Date: Mon, 18 May 2015 18:10:07 +0100 [thread overview]
Message-ID: <20150518171007.GA10058@strange.ger.corp.intel.com> (raw)
In-Reply-To: <20150518083006.GM15256@phenom.ffwll.local>
On Mon, May 18, 2015 at 10:30:06AM +0200, Daniel Vetter wrote:
> On Fri, May 15, 2015 at 12:09:00PM +0100, Tvrtko Ursulin wrote:
> >
> > Hi,
> >
> > On 05/15/2015 11:42 AM, Chris Wilson wrote:
> > >Mika encountered one pathological scenario under X where acquiring all
> > >the mm locks (required to insert a mmu notifier) was very slow, so slow
> > >that by the time we tried to lock the struct_mutex with the usual call
> > >to i915_mutex_lock_interruptible(), X's signal timer had fired causing
> > >us to restart the ioctl (and so looped indefinitely).
> >
> > Indefinite loop? Are you saying userptr creation endlessly fails to manages
> > to finish in 10ms (or is it even 100ms, forgot what timer Xorg setups up)?
> > The __mmu_notifier_register call?
> >
> > >While I suspect this is the result of another bug (something leaking mm
> > >perhaps?) we can forgo the error checking and interuptible nature of the
> > >lock here so we only have to pay the expense once and get on with it.
> > >This does expose the userptr creation routine to a driver livelock
> > >though by not being interruptible.
> >
> > How is this acceptable then if it can live-lock? How does that happen?
>
> If the i915 driver somehow dies it's a lot nicer for the user to be able
> to hit ^C and get out of trouble again and debug further than make
> anything touching i915 be stuck forever.
>
> But I think this is a justified exception. Queued for -next, thanks for
> the patch.
This breaks my SKL. Reverting make it work again.
I can still boot in init 3 to see what happens. gem_render_copy (for
instance) will then cause an infinite loop when initializing libdrm: we
do call GEM_USERPTR in the bufmgr init that cycles in drmIoctl, the
ioctl() always returning -EGAIN.
--
Damien
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-05-18 17:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 10:42 [PATCH] drm/i915: Use uninterruptible mutex_lock for userptr bo creation Chris Wilson
2015-05-15 11:09 ` Tvrtko Ursulin
2015-05-18 8:30 ` Daniel Vetter
2015-05-18 13:18 ` Chris Wilson
2015-05-18 17:10 ` Damien Lespiau [this message]
2015-05-18 20:21 ` Chris Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150518171007.GA10058@strange.ger.corp.intel.com \
--to=damien.lespiau@intel.com \
--cc=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox