From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Unwind partial VMA rebinding after failure in set-cache-level
Date: Fri, 9 Oct 2015 13:37:19 +0100 [thread overview]
Message-ID: <5617B4FF.1000502@linux.intel.com> (raw)
In-Reply-To: <20151009121943.GC7517@nuc-i3427.alporthouse.com>
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. :)
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-10-09 12:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-09 11:51 [PATCH] drm/i915: Unwind partial VMA rebinding after failure in set-cache-level Chris Wilson
2015-10-09 12:11 ` Tvrtko Ursulin
2015-10-09 12:18 ` Chris Wilson
2015-10-09 12:19 ` Chris Wilson
2015-10-09 12:37 ` Tvrtko Ursulin [this message]
2015-10-09 13:10 ` 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=5617B4FF.1000502@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.