From: Tvrtko Ursulin <tursulin@ursulin.net>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH v2 0/6] Per-context and per-client engine busyness
Date: Fri, 19 Jan 2018 13:45:22 +0000 [thread overview]
Message-ID: <20180119134528.4720-1-tvrtko.ursulin@linux.intel.com> (raw)
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
I have sent this as part of a larger series back in October '17.
First part of it is implementing a customer requirement to be able to query
engine utilization on their own contexts. This is done in patch 2, which falls
under the standard open source userspace requirements etc.
The rest of the series implements per-client engine utilization stats, something
which I think is quite interesting and missing from our stack at the moment. And
in fact, in the latest other OS update I have noticed they actually can expose
this statistics.
I have prototyped a simple top-like utility which can show you the overall
engine stats (data coming from recently merged PMU), and then using the sysfs
API from this series a sorted breakdown of currently running clients. Output of
that looks like this:
rcs0: 88.89% busy ( 0.27 qd), 0.00% wait, 0.00% sema
bcs0: 27.50% busy ( 0.00 qd), 0.00% wait, 0.00% sema
vcs0: 86.75% busy ( 0.00 qd), 0.00% wait, 0.00% sema
vecs0: 0.00% busy ( 0.00 qd), 0.00% wait, 0.00% sema
gem_wsim[ 21806]: rcs0: 43.18% bcs0: 27.52% vcs0: 86.80% vecs0: 0.00%
Xorg[ 21451]: rcs0: 33.60% bcs0: 0.00% vcs0: 0.00% vecs0: 0.00%
chromium-browse[ 21670]: rcs0: 12.16% bcs0: 0.00% vcs0: 0.00% vecs0: 0.00%
Xorg[ 21451]: rcs0: 0.00% bcs0: 0.00% vcs0: 0.00% vecs0: 0.00%
xfwm4[ 21506]: rcs0: 0.00% bcs0: 0.00% vcs0: 0.00% vecs0: 0.00%
Patch series needs some more work, for instance the summation of busyness per-
client is not the most efficient, standard debugging and so, but seems to work
reasonably well so far.
What is also possible to do on top of this series, is to extend our current PMU
interface to allow per-task profiling via perf tool as well. I have started
implementing that at one point and could go back to it.
Tvrtko Ursulin (6):
drm/i915: Track per-context engine busyness
drm/i915: Allow clients to query own per-engine busyness
drm/i915: Expose list of clients in sysfs
drm/i915: Update client name on context create
drm/i915: Expose per-engine client busyness
drm/i915: Add sysfs toggle to enable per-client engine stats
drivers/gpu/drm/i915/i915_drv.h | 24 +++++
drivers/gpu/drm/i915/i915_gem.c | 178 ++++++++++++++++++++++++++++++--
drivers/gpu/drm/i915/i915_gem_context.c | 56 +++++++++-
drivers/gpu/drm/i915/i915_gem_context.h | 6 ++
drivers/gpu/drm/i915/i915_sysfs.c | 80 ++++++++++++++
drivers/gpu/drm/i915/intel_engine_cs.c | 32 ++++++
drivers/gpu/drm/i915/intel_lrc.c | 14 ++-
drivers/gpu/drm/i915/intel_ringbuffer.h | 50 +++++++--
include/uapi/drm/i915_drm.h | 11 +-
9 files changed, 427 insertions(+), 24 deletions(-)
--
2.14.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2018-01-19 13:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-19 13:45 Tvrtko Ursulin [this message]
2018-01-19 13:45 ` [PATCH 1/6] drm/i915: Track per-context engine busyness Tvrtko Ursulin
2018-01-19 16:26 ` [PATCH v5 " Tvrtko Ursulin
2018-01-19 21:02 ` Chris Wilson
2018-01-19 13:45 ` [PATCH 2/6] drm/i915: Allow clients to query own per-engine busyness Tvrtko Ursulin
2018-01-19 21:08 ` Chris Wilson
2018-01-22 9:53 ` Tvrtko Ursulin
2018-01-22 10:00 ` Chris Wilson
2018-01-22 11:45 ` Tvrtko Ursulin
2018-01-22 12:32 ` Chris Wilson
2018-01-22 17:11 ` Tvrtko Ursulin
2018-01-19 13:45 ` [PATCH 3/6] drm/i915: Expose list of clients in sysfs Tvrtko Ursulin
2018-01-19 13:45 ` [PATCH 4/6] drm/i915: Update client name on context create Tvrtko Ursulin
2018-01-19 13:45 ` [PATCH 5/6] drm/i915: Expose per-engine client busyness Tvrtko Ursulin
2018-01-22 9:59 ` Tvrtko Ursulin
2018-01-19 13:45 ` [PATCH 6/6] drm/i915: Add sysfs toggle to enable per-client engine stats Tvrtko Ursulin
2018-01-19 15:31 ` ✗ Fi.CI.BAT: failure for Per-context and per-client engine busyness (rev2) Patchwork
2018-01-19 16:54 ` ✗ Fi.CI.BAT: failure for Per-context and per-client engine busyness (rev3) Patchwork
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=20180119134528.4720-1-tvrtko.ursulin@linux.intel.com \
--to=tursulin@ursulin.net \
--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.