From: Ben Widawsky <ben@bwidawsk.net>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Ben Widawsky <benjamin.widawsky@intel.com>,
Intel GFX <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 3/5] drm/i915: Remove node only when allocated
Date: Mon, 12 Aug 2013 18:37:56 -0700 [thread overview]
Message-ID: <20130813013756.GA19697@bwidawsk.net> (raw)
In-Reply-To: <20130810084505.GD3561@cantiga.alporthouse.com>
On Sat, Aug 10, 2013 at 09:45:05AM +0100, Chris Wilson wrote:
> On Fri, Aug 09, 2013 at 10:12:14PM -0700, Ben Widawsky wrote:
> > In upcoming code, it will be possible for a vma to have been created,
> > but no space reserved for it in the address space. The drm_mm semantics
> > are such that trying to remove an unallocated node is not allowed.
>
> But not allocated during unbind, i.e. calling unbind() before bind()?
> That seems scary enough.
> -Chris
>
The condition can occur if we create a vma, fail to bind it, and then
free up the object (which tries to unbind). As I alluded to, this
cannot happen until we do the execbufer vma creation.
The example for which is can happen is if we have some object created,
with a vma
AFAICT, this condition cannot occur until we actually are using multiple
VMs, but once we are the following can occur:
object X created for context Y
VMA-Y created for object X
VMA-Z created for object X, but fails before or during bind
VMA-Z persists
object X destroyed
free calls unbind on all VMAs. VMA-Z has no node allocated for it.
One way to may this better is to not call unbind() if it isn't
allocated, and simply call vma_destroy(). I don't really care. You tell
me what you want.
--
Ben Widawsky, Intel Open Source Technology Center
next prev parent reply other threads:[~2013-08-13 1:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-10 5:12 [PATCH 1/5] drm/i915: WARN_ON failed map_and_fenceable Ben Widawsky
2013-08-10 5:12 ` [PATCH 2/5] drm/i915: bind m&f cleanup Ben Widawsky
2013-08-10 8:41 ` Chris Wilson
2013-08-13 0:17 ` Ben Widawsky
2013-08-10 5:12 ` [PATCH 3/5] drm/i915: Remove node only when allocated Ben Widawsky
2013-08-10 8:45 ` Chris Wilson
2013-08-13 1:37 ` Ben Widawsky [this message]
2013-08-10 5:12 ` [PATCH 4/5] drm: WARN when removing unallocated node Ben Widawsky
2013-08-10 8:48 ` Chris Wilson
2013-08-10 5:12 ` [PATCH 5/5] drm/i915: Convert execbuf code to use vmas Ben Widawsky
2013-08-10 9:01 ` Chris Wilson
2013-08-10 9:10 ` Chris Wilson
2013-08-10 9:13 ` Chris Wilson
2013-08-13 1:50 ` Ben Widawsky
2013-08-10 8:43 ` [PATCH 1/5] drm/i915: WARN_ON failed map_and_fenceable Chris Wilson
2013-08-10 8:58 ` Daniel Vetter
2013-08-10 8:58 ` Daniel Vetter
2013-08-10 17:17 ` Ben Widawsky
2013-08-10 18:05 ` 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=20130813013756.GA19697@bwidawsk.net \
--to=ben@bwidawsk.net \
--cc=benjamin.widawsky@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox