From: Chris Wilson <chris@chris-wilson.co.uk>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH 5/5] drm/i915: non-interruptible sleeps can't handle -EGAIN
Date: Mon, 25 Jun 2012 21:23:38 +0100 [thread overview]
Message-ID: <1340655858_69625@CP5-2952> (raw)
In-Reply-To: <1340548956-4097-6-git-send-email-daniel.vetter@ffwll.ch>
On Sun, 24 Jun 2012 16:42:36 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> So don't return -EAGAIN, even in the case of a gpu hang. Remap it to -EIO
> instead.
>
> This is a bit ugly because intel_ring_begin is all non-interruptible
> and hence only returns -EIO. But as the comment in there says,
> auditing all the callsites would be a pain.
>
> To avoid duplicating code, reuse i915_gem_check_wedge in __wait_seqno.
> Use the opportunity to clarify the different cases a bit with
> comments.
Two separate patches. The first chunk sounds reasonable,
non-interruptible is a little bit of misnomer here, we mostly use it to
mean NOFAIL, and none of the callers are setup to handle EAGAIN. So
reporting EIO seems reasonable.
The rationale for if (wedged) return -EGAIN, was that originally it was
called under the mutex and all paths prior to that point sould have
checked the wedged status upon acquiring the mutex, and so to encounter
a wedged at that point implied that reset had not yet been run and so the
right error code was always EGAIN. However now it is lockless, so
check_wedge is more than just a cleanup but a useful early test for EIO.
(Aside from the BUG_ON!)
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
next prev parent reply other threads:[~2012-06-25 20:24 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-24 14:42 [PATCH 0/5] gpu reset improvements Daniel Vetter
2012-06-24 14:42 ` [PATCH 1/5] drm/i915: wrap up gt powersave enabling functions Daniel Vetter
2012-06-24 23:03 ` Eugeni Dodonov
2012-06-25 7:20 ` Daniel Vetter
2012-06-29 18:51 ` Ben Widawsky
2012-06-29 21:11 ` Daniel Vetter
2012-06-24 14:42 ` [PATCH 2/5] drm/i915: make enable/disable_gt_powersave locking consistent Daniel Vetter
2012-06-24 23:03 ` Eugeni Dodonov
2012-06-25 19:08 ` Daniel Vetter
2012-06-24 14:42 ` [PATCH 3/5] drm/i915: don't return a spurious -EIO from intel_ring_begin Daniel Vetter
2012-06-25 20:32 ` Chris Wilson
2012-06-25 20:49 ` Daniel Vetter
2012-06-25 21:06 ` Chris Wilson
2012-06-25 21:48 ` Daniel Vetter
2012-06-25 22:52 ` Chris Wilson
2012-06-25 23:05 ` Daniel Vetter
2012-06-26 9:30 ` Chris Wilson
2012-06-24 14:42 ` [PATCH 4/5] drm/i915: don't trylock in the gpu reset code Daniel Vetter
2012-06-25 20:10 ` Chris Wilson
2012-06-24 14:42 ` [PATCH 5/5] drm/i915: non-interruptible sleeps can't handle -EGAIN Daniel Vetter
2012-06-25 20:23 ` Chris Wilson [this message]
2012-06-25 20:35 ` Daniel Vetter
2012-06-25 20:24 ` [PATCH] " Daniel Vetter
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=1340655858_69625@CP5-2952 \
--to=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
/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