public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/i915: Ignore duplicate VMA stored within the per-object handle LUT
Date: Mon, 18 Sep 2017 16:55:58 +0300	[thread overview]
Message-ID: <1505742958.14048.73.camel@linux.intel.com> (raw)
In-Reply-To: <150409420509.1572.14545058333811396783@mail.alporthouse.com>

On Wed, 2017-08-30 at 12:56 +0100, Chris Wilson wrote:
> Quoting Joonas Lahtinen (2017-08-30 12:07:47)
> > On Wed, 2017-08-23 at 11:20 +0100, Chris Wilson wrote:
> > > Quoting Joonas Lahtinen (2017-08-23 11:05:18)
> > > > On Tue, 2017-08-22 at 12:05 +0100, Chris Wilson wrote:
> > > > > By using drm_gem_flink/drm_gem_open on an object using the same fd, it
> > > > > is possible for a client to create multiple handles pointing to the same
> > > > > object (tied to the same contexts and VMA), as exemplified by
> > > > > igt::gem_handle_to_libdrm_bo(). Since this duplication has been possible
> > > > > since forever, we cannot assume that the handle:(fpriv, object) is
> > > > > unique and so must handle the multiple users of a single VMA.
> > > > > 
> > > > > Testcase: igt/gem_close
> > > > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102355
> > > > > Fixes: d1b48c1e7184 ("drm/i915: Replace execbuf vma ht with an idr")
> > > > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > > > Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > > > > Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > > > 
> > > > <SNIP>
> > > > 
> > > > > +++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
> > > > > @@ -720,6 +720,7 @@ static int eb_lookup_vmas(struct i915_execbuffer *eb)
> > > > >                       goto err_obj;
> > > > >               }
> > > > >  
> > > > > +             vma->open_count++;
> > > > >               list_add(&lut->obj_link, &obj->lut_list);
> > > > 
> > > > This code maybe should be in i915_gem.c as "i915_gem_object_add_lut" or
> > > > something.
> > > 
> > > I disagree. It's very much tied to being an execbuf only interaction,
> > > that obj/ctx/handle.
> > 
> > So how are we going to proceed here? The current proposed solution is
> > very unintuitive, one counter spread over multiple files.
> 
> The table is very much for the entertainment of execbuf (and if you
> squint hard, ok not hard at all, so is the rest of GEM), if you were to
> push hard that's where I suggest to shove it.
> 
> But I'm not yet seeing the issue with one side being clear where the
> user opens the vma and the other where it is closed by the user.

As long as it's in one file, all good, so execbuf is fine.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-09-18 13:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22 11:05 [PATCH 1/3] drm/i915: Assert the context is not closed on object-close Chris Wilson
2017-08-22 11:05 ` [PATCH 2/3] drm/i915: Assert that the handle->vma lut is empty on object close Chris Wilson
2017-08-22 11:05 ` [PATCH 3/3] drm/i915: Ignore duplicate VMA stored within the per-object handle LUT Chris Wilson
2017-08-23 10:05   ` Joonas Lahtinen
2017-08-23 10:20     ` Chris Wilson
2017-08-30 11:07       ` Joonas Lahtinen
2017-08-30 11:56         ` Chris Wilson
2017-09-18 13:55           ` Joonas Lahtinen [this message]
2017-08-22 11:59 ` [PATCH 1/3] drm/i915: Assert the context is not closed on object-close Lofstedt, Marta
2017-08-24 14:25   ` Chris Wilson
2017-08-22 12:06 ` ✓ Fi.CI.BAT: success for series starting with [1/3] " Patchwork
2017-08-24 14:30   ` 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=1505742958.14048.73.camel@linux.intel.com \
    --to=joonas.lahtinen@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox