From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: intel-gfx@lists.freedesktop.org, miku@iki.fi
Subject: Re: [PATCH 1/2] drm/i915: reference count for i915_hw_contexts
Date: Tue, 30 Apr 2013 23:39:54 +0200 [thread overview]
Message-ID: <20130430213954.GC5763@phenom.ffwll.local> (raw)
In-Reply-To: <20130430184016.GA8393@bwidawsk.net>
On Tue, Apr 30, 2013 at 11:40:16AM -0700, Ben Widawsky wrote:
> On Tue, Apr 30, 2013 at 01:30:33PM +0300, Mika Kuoppala wrote:
> > Enabling PPGTT and also the need to track which context was guilty of
> > gpu hang (arb robustness enabling) have put pressure for struct i915_hw_context
> > to be more than just a placeholder for hw context state.
> >
> > In order to track object lifetime properly in a multi peer usage, add reference
> > counting for i915_hw_context.
> >
> > v2: track i915_hw_context pointers instead of using ctx_ids
> > (from Chris Wilson)
> >
> > v3 (Ben): Get rid of do_release() and handle refcounting more compactly.
> > (recommended by Chis)
> >
> > v4: kref_* put inside static inlines (Daniel Vetter)
> > remove code duplication on freeing context (Chris Wilson)
> >
> > v5: idr_remove and ctx->file_priv = NULL in destroy ioctl (Chris)
> > This actually will cause a problem if one destroys a context and later
> > refers to the idea of the context (multiple contexts may have the same
> > id, but only 1 will exist in the idr).
> >
> > v6: Strip out the request related stuff. Reworded commit message.
> > Got rid of do_destroy and introduced i915_gem_context_release_handle,
> > suggested by Chris Wilson.
> >
> > v7: idr_remove can't be called inside idr_for_each (Chris Wilson)
> >
> > Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> (v2)
> > Signed-off-by: Ben Widawsky <ben@bwidawsk.net> (v3)
> > Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> (v4)
> > Signed-off-by: Ben Widawsky <ben@bwidawsk.net> (v5)
> > Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> (v7)
>
> I can't spot anything wrong, thought I'd argue this commit message
> belongs with the actual reference counting to come later since a lot of
> the history is with bugs found there.
>
> This patch is simply introducing context refcounting interfaces and
> replacing explicit destruction with unreferencing (and in all cases
> there should be no functional impact).
>
> So bring on the real request reference counting now!
> Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
prev parent reply other threads:[~2013-04-30 21:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-30 10:30 [PATCH 1/2] drm/i915: reference count for i915_hw_contexts Mika Kuoppala
2013-04-30 10:30 ` [PATCH 2/2] drm/i915: unreference default context on module unload Mika Kuoppala
2013-04-30 15:49 ` Ben Widawsky
2013-05-02 8:37 ` Mika Kuoppala
2013-05-02 16:10 ` Ben Widawsky
2013-05-03 13:29 ` [PATCH v2] " Mika Kuoppala
2013-05-03 15:53 ` Ben Widawsky
2013-05-03 16:22 ` Daniel Vetter
2013-04-30 18:40 ` [PATCH 1/2] drm/i915: reference count for i915_hw_contexts Ben Widawsky
2013-04-30 21:39 ` Daniel Vetter [this message]
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=20130430213954.GC5763@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=ben@bwidawsk.net \
--cc=intel-gfx@lists.freedesktop.org \
--cc=miku@iki.fi \
/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.