Re: [PATCH] drm/i915: Unwind partial VMA rebinding after failure in set-cache-level

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

 



On Fri, Oct 09, 2015 at 01:37:19PM +0100, Tvrtko Ursulin wrote:
> 
> On 09/10/15 13:19, Chris Wilson wrote:
> >On Fri, Oct 09, 2015 at 01:11:47PM +0100, Tvrtko Ursulin wrote:
> >>
> >>On 09/10/15 12:51, Chris Wilson wrote:
> >>>If the impossible happens and we fail to rebind a VMA in the middle of
> >>>rebinding all VMA for an object we currently bail out and leave the
> >>>object in an inconsistent state. Attempt to unwind the incomplete update
> >>>by reverting all updated VMA back to the original cache-level, and WARN
> >>>if that fails.
> >>
> >>Hey a BUG_ON would have been more your style! ;)
> >
> >Propagating error returns trumps throwing a tantrum and then as we are
> >on the the error path we've already proved the impossible could happen,
> >so presume it could happen again.
> 
> No no, just a BUG_ON(i915_bind_vma()) on the original call site
> would suffice since it cannot happen anyway. ;>
> 
> For the same reason it is safe to skip the current entry when
> reversing I suppose.
> 
> But it is still code to handle something which can't happen. If you
> want to stuff it under future proofing you can have my r-b, but hope
> someone who doesn't like future proofing notices. :)

Maybe I should say nothing is impossible with i915_gem_gtt.c :)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux