From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Add a tracepoint for using a semaphore
Date: Mon, 26 Aug 2013 16:20:06 +0300 [thread overview]
Message-ID: <20130826132006.GR11428@intel.com> (raw)
In-Reply-To: <1377521181-10379-1-git-send-email-chris@chris-wilson.co.uk>
On Mon, Aug 26, 2013 at 01:46:21PM +0100, Chris Wilson wrote:
> So that we can find the callers who introduce a ring stall. A single
> ring stall is not too unwelcome, the right issue becomes when they start
> to interlock and prevent any concurrent work. That, however, is a little
> tricker to detect with a mere tracepoint!
I was staring at the semaphore code a bit recently, and I was wondering
if it would make sense to do a manual seqno check (against the ring's
current seqno, not just the last sync_seqno) before we decide to
add the semaphore into the ring?
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/i915_gem.c | 2 ++
> drivers/gpu/drm/i915/i915_trace.h | 19 +++++++++++++++++++
> 2 files changed, 21 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 85537d1..0122278 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2698,6 +2698,8 @@ i915_gem_object_sync(struct drm_i915_gem_object *obj,
> if (ret)
> return ret;
>
> + trace_i915_gem_object_sync(obj, to);
> +
> ret = to->sync_to(to, from, seqno);
> if (!ret)
> /* We use last_read_seqno because sync_to()
> diff --git a/drivers/gpu/drm/i915/i915_trace.h b/drivers/gpu/drm/i915/i915_trace.h
> index feaacbb..728c43b 100644
> --- a/drivers/gpu/drm/i915/i915_trace.h
> +++ b/drivers/gpu/drm/i915/i915_trace.h
> @@ -33,6 +33,25 @@ TRACE_EVENT(i915_gem_object_create,
> TP_printk("obj=%p, size=%u", __entry->obj, __entry->size)
> );
>
> +TRACE_EVENT(i915_gem_object_sync,
> + TP_PROTO(struct drm_i915_gem_object *obj, struct intel_ring_buffer *to),
> + TP_ARGS(obj, to),
> +
> + TP_STRUCT__entry(
> + __field(struct drm_i915_gem_object *, obj)
> + __field(u32, sync_from)
> + __field(u32, sync_to)
> + ),
> +
> + TP_fast_assign(
> + __entry->obj = obj;
> + __entry->sync_from = obj->ring->id;
> + __entry->sync_to = to->id;
> + ),
> +
> + TP_printk("obj=%p, sync-from=%u, sync-to=%u", __entry->obj, __entry->sync_from, __entry->sync_to)
> +);
> +
> TRACE_EVENT(i915_vma_bind,
> TP_PROTO(struct i915_vma *vma, bool mappable),
> TP_ARGS(vma, mappable),
> --
> 1.8.4.rc3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2013-08-26 13:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 12:46 [PATCH] drm/i915: Add a tracepoint for using a semaphore Chris Wilson
2013-08-26 13:20 ` Ville Syrjälä [this message]
2013-08-26 13:30 ` Chris Wilson
-- strict thread matches above, loose matches on Subject: below --
2013-08-26 13:34 Chris Wilson
2013-09-25 10:11 [PATCH 09/13] " Daniel Vetter
2013-09-25 10:43 ` [PATCH] " Chris Wilson
2013-09-25 11:29 ` Ville Syrjälä
2013-09-25 11:31 ` 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=20130826132006.GR11428@intel.com \
--to=ville.syrjala@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