On Tue, Nov 13, 2012 at 9:56 AM, Chris Wilson <chris at chris-wilson.co.uk> wrote: > On Mon, 12 Nov 2012 23:07:52 +0100, Daniel Vetter <daniel.vetter at ffwll.ch> wrote: >> While auditing the code I've noticed one place (the throttle ioctl) >> which does not yet wait for the reset handler to complete and doesn't >> properly decode the wedge state into -EAGAIN/-EIO. Fix this up by >> calling the right helpers. This might explain the oddball "my >> compositor just died in a successfull gpu reset" reports. > > It is a standalone bugfix and should be split into its own patch. But I > don't think it quite has the impact you describe, since it only called > by the ddx and only sna bothers to check the error code. And one > side-effect is that I think for especilly this case > i915_gem_check_wedge() should be setting set_need_resched() before > returning -EAGAIN. Yeah, I've somehow ended up being lazy yesterday, will split out. For the need-resched. Wrt the set_need_resched I think we're ok, to avoid busy-looping I've added a call to i915_gem_wait_for_error. And imo there's no need to micro-optimize the reset handling by getting of the cpu a notch earlier. I'll extend the commit message of the split-out patch to mention that little detail. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch