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: Wed, 25 Sep 2013 14:29:34 +0300 [thread overview]
Message-ID: <20130925112934.GM4531@intel.com> (raw)
In-Reply-To: <1380105808-28151-1-git-send-email-chris@chris-wilson.co.uk>
On Wed, Sep 25, 2013 at 11:43:28AM +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!
>
> v2: Rebrand it as a ring event, rather than an object event.
> v3: Include the seqno in the tracepoint for posterity or something.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/i915_gem.c | 1 +
> drivers/gpu/drm/i915/i915_trace.h | 26 ++++++++++++++++++++++++++
> 2 files changed, 27 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 82bc029..fa3b373 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -2625,6 +2625,7 @@ i915_gem_object_sync(struct drm_i915_gem_object *obj,
> if (ret)
> return ret;
>
> + trace_i915_gem_ring_sync_to(from, to, seqno);
> ret = to->sync_to(to, from, seqno);
Passing the rings in the same order to both might avoid some confusion,
but I don't care enough to withhold my r-b so:
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 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 daa6fdf..6e580c9 100644
> --- a/drivers/gpu/drm/i915/i915_trace.h
> +++ b/drivers/gpu/drm/i915/i915_trace.h
> @@ -248,6 +248,32 @@ TRACE_EVENT(i915_gem_evict_vm,
> TP_printk("dev=%d, vm=%p", __entry->vm->dev->primary->index, __entry->vm)
> );
>
> +TRACE_EVENT(i915_gem_ring_sync_to,
> + TP_PROTO(struct intel_ring_buffer *from,
> + struct intel_ring_buffer *to,
> + u32 seqno),
> + TP_ARGS(from, to, seqno),
> +
> + TP_STRUCT__entry(
> + __field(u32, dev)
> + __field(u32, sync_from)
> + __field(u32, sync_to)
> + __field(u32, seqno)
> + ),
> +
> + TP_fast_assign(
> + __entry->dev = from->dev->primary->index;
> + __entry->sync_from = from->id;
> + __entry->sync_to = to->id;
> + __entry->seqno = seqno;
> + ),
> +
> + TP_printk("dev=%u, sync-from=%u, sync-to=%u, seqno=%u",
> + __entry->dev,
> + __entry->sync_from, __entry->sync_to,
> + __entry->seqno)
> +);
> +
> TRACE_EVENT(i915_gem_ring_dispatch,
> TP_PROTO(struct intel_ring_buffer *ring, u32 seqno, u32 flags),
> TP_ARGS(ring, seqno, flags),
> --
> 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-09-25 11:29 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-23 20:33 [PATCH 00/13] drm-intel-collector - review request Rodrigo Vivi
2013-09-23 20:33 ` [PATCH 01/13] drm/i915: check that the i965g/gm 4G limit is really obeyed Rodrigo Vivi
2013-09-23 20:33 ` [PATCH 02/13] drm/i915: Move the conditional seqno query into the tracepoint Rodrigo Vivi
2013-09-24 18:50 ` Ville Syrjälä
2013-09-24 19:20 ` Daniel Vetter
2013-09-23 20:33 ` [PATCH 03/13] drm/i915: Add some missing steps to i915_driver_load error path Rodrigo Vivi
2013-10-02 17:00 ` Daniel Vetter
2013-09-23 20:33 ` [PATCH 04/13] drm/i915: Asynchronously perform the set-base for a simple modeset Rodrigo Vivi
2013-09-23 20:33 ` [PATCH 05/13] drm/i915: Align tiled scanouts from stolen memory to 256k in the GTT Rodrigo Vivi
2013-09-23 20:33 ` [PATCH 06/13] drm/i915: Pair seqno completion tracepoint with its dispatch Rodrigo Vivi
2013-09-23 20:33 ` [PATCH 07/13] drm/i915: Initialise min/max frequencies before updating RPS registers Rodrigo Vivi
2013-09-23 20:33 ` [PATCH 08/13] drm/i915: Delay the relase of the forcewake by a jiffie Rodrigo Vivi
2013-09-23 20:33 ` [PATCH 09/13] drm/i915: Add a tracepoint for using a semaphore Rodrigo Vivi
2013-09-25 9:34 ` Ville Syrjälä
2013-09-25 10:11 ` Daniel Vetter
2013-09-25 10:43 ` [PATCH] " Chris Wilson
2013-09-25 11:29 ` Ville Syrjälä [this message]
2013-09-25 11:31 ` Daniel Vetter
2013-09-23 20:33 ` [PATCH 10/13] drm/i915: Boost RPS frequency for CPU stalls Rodrigo Vivi
2013-09-23 20:33 ` [PATCH 11/13] drm/i915: Tweak RPS thresholds to more aggressively downclock Rodrigo Vivi
2013-09-23 20:33 ` [PATCH 12/13] drm/i915: Allow GT3 Slice Shutdown on Boot Rodrigo Vivi
2013-09-23 20:33 ` [PATCH 13/13] drm/i915: Allow Dynamically GT3 Slice Shutdown Rodrigo Vivi
2013-09-23 21:13 ` Chris Wilson
2013-09-24 10:15 ` [PATCH 00/13] drm-intel-collector - review request Daniel Vetter
2013-09-24 10:32 ` Chris Wilson
2013-09-24 10:47 ` Daniel Vetter
2013-09-24 11:11 ` Chris Wilson
2013-09-24 11:22 ` Daniel Vetter
-- strict thread matches above, loose matches on Subject: below --
2013-08-26 13:34 [PATCH] drm/i915: Add a tracepoint for using a semaphore Chris Wilson
2013-08-26 12:46 Chris Wilson
2013-08-26 13:20 ` Ville Syrjälä
2013-08-26 13: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=20130925112934.GM4531@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 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.