All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/5] Per-client engine stats
@ 2018-02-14 18:50 Tvrtko Ursulin
  2018-02-14 18:50 ` [RFC 1/5] drm/i915: Track per-context engine busyness Tvrtko Ursulin
                   ` (8 more replies)
  0 siblings, 9 replies; 24+ messages in thread
From: Tvrtko Ursulin @ 2018-02-14 18:50 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

Another re-post of my earlier, now slightly updated work, to expose a DRM client
hierarchy in sysfs in order to enable a top like tool:

intel-gpu-top - load avg  9.47,  3.34,  0.13; 1000/ 950 MHz;    0% RC6;   5202mW;     1206 irqs/s

    rcs0 100.00% ( 0.56/ 4.78/ 3.86) |██████████████████████████████████████████████████████████████████|  0.00% wait,   0.00% sema
    bcs0  17.72% ( 0.81/ 0.00/ 0.17) |███████████▋                                                      |  0.00% wait,   0.00% sema
    vcs0  61.08% ( 0.81/ 0.00/ 0.63) |████████████████████████████████████████▎                         |  0.00% wait,   0.00% sema
   vecs0   0.00% ( 0.00/ 0.00/ 0.00) |                                                                  |  0.00% wait,   0.00% sema

  PID            NAME           rcs0                       bcs0                       vcs0                       vecs0
 9654       neverball |████████████             ||                         ||                         ||                         |
 7792            Xorg |████████▊                ||                         ||                         ||                         |
 9659        gem_wsim |████                     ||████▍                    ||███████████████▎         ||                         |
 7846           xfwm4 |                         ||                         ||                         ||                         |

I'll post the IGT support for this as well. It requires both this series and
engine queue depth PMU RFC-ed recently.

Tvrtko Ursulin (5):
  drm/i915: Track per-context 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         |  31 ++++++
 drivers/gpu/drm/i915/i915_gem.c         | 192 ++++++++++++++++++++++++++++++--
 drivers/gpu/drm/i915/i915_gem_context.c |  23 +++-
 drivers/gpu/drm/i915/i915_gem_context.h |   7 ++
 drivers/gpu/drm/i915/i915_sysfs.c       |  80 +++++++++++++
 drivers/gpu/drm/i915/intel_engine_cs.c  |  29 +++++
 drivers/gpu/drm/i915/intel_lrc.c        |  14 ++-
 drivers/gpu/drm/i915/intel_ringbuffer.h |  56 +++++++++-
 8 files changed, 412 insertions(+), 20 deletions(-)

-- 
2.14.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread
* [RFC 0/5] Per client engine busyness (all aboard the sysfs train!)
@ 2019-10-25 14:21 Tvrtko Ursulin
  2019-10-25 14:21 ` [RFC 2/5] drm/i915: Expose list of clients in sysfs Tvrtko Ursulin
  0 siblings, 1 reply; 24+ messages in thread
From: Tvrtko Ursulin @ 2019-10-25 14:21 UTC (permalink / raw)
  To: Intel-gfx

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

It was quite some time since I last posted this RFC, but recently there has been
some new interest, this time from OpenCL and related customers, so I decided to
give it a quick respin and test the waters.

This time round it has been really hastily rebased since the upstream changed
quite a lot and I have very little confidence it is technically correct. But it
is enough to illustrate a point of what this feature could provide:

In short it enables a "top-like" display for GPU tasks. Or with a screenshot:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
intel-gpu-top -  948/ 999 MHz;    0% RC6;  3.65 Watts;     2165 irqs/s

      IMC reads:     5015 MiB/s
     IMC writes:      143 MiB/s

          ENGINE      BUSY                                                    MI_SEMA MI_WAIT
     Render/3D/0   56.60% |███████████████████████████▋                     |      0%      0%
       Blitter/0   95.65% |██████████████████████████████████████████████▊  |      0%      0%
         Video/0   40.92% |████████████████████                             |      0%      0%
  VideoEnhance/0    0.00% |                                                 |      0%      0%

  PID            NAME       RCS               BCS               VCS               VECS
 5347        gem_wsim |███████▍        ||███████████████▏||██████▌         ||                |
 4929            Xorg |▎               ||                ||                ||                |
 5305        glxgears |                ||                ||                ||                |
 5303        glxgears |                ||                ||                ||                |
 5024           xfwm4 |                ||                ||                ||                |
 4929            Xorg |                ||                ||                ||                |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Implementation wise we would get a a bunch of per-drm-client-per-engine-class
files in sysfs like:

	# cd /sys/class/drm/card0/clients/
	# tree
	.
	├── 7
	│   ├── busy
	│   │   ├── 0
	│   │   ├── 1
	│   │   ├── 2
	│   │   └── 3
	│   ├── name
	│   └── pid
	├── 8
	│   ├── busy
	│   │   ├── 0
	│   │   ├── 1
	│   │   ├── 2
	│   │   └── 3
	│   ├── name
	│   └── pid
	├── 9
	│   ├── busy
	│   │   ├── 0
	│   │   ├── 1
	│   │   ├── 2
	│   │   └── 3
	│   ├── name
	│   └── pid
	└── enable_stats

I will post the corresponding patch to intel_gpu_top for reference as well.

Tvrtko Ursulin (5):
  drm/i915: Track per-context 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/gem/i915_gem_context.c   |  17 +-
 drivers/gpu/drm/i915/gt/intel_context.c       |  20 ++
 drivers/gpu/drm/i915/gt/intel_context.h       |   9 +
 drivers/gpu/drm/i915/gt/intel_context_types.h |   9 +
 drivers/gpu/drm/i915/gt/intel_engine_cs.c     |  16 +-
 drivers/gpu/drm/i915/gt/intel_lrc.c           |  66 +++++-
 drivers/gpu/drm/i915/i915_drv.h               |  38 +++
 drivers/gpu/drm/i915/i915_gem.c               | 218 +++++++++++++++++-
 drivers/gpu/drm/i915/i915_sysfs.c             |  81 +++++++
 9 files changed, 451 insertions(+), 23 deletions(-)

-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2019-10-25 14:35 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-14 18:50 [RFC 0/5] Per-client engine stats Tvrtko Ursulin
2018-02-14 18:50 ` [RFC 1/5] drm/i915: Track per-context engine busyness Tvrtko Ursulin
2018-02-14 19:07   ` Chris Wilson
2018-02-15  9:29     ` Tvrtko Ursulin
2018-02-15  9:35       ` Chris Wilson
2018-02-14 18:50 ` [RFC 2/5] drm/i915: Expose list of clients in sysfs Tvrtko Ursulin
2018-02-14 19:13   ` Chris Wilson
2018-02-15  9:35     ` Tvrtko Ursulin
2018-02-14 18:50 ` [RFC 3/5] drm/i915: Update client name on context create Tvrtko Ursulin
2018-02-14 18:50 ` [RFC 4/5] drm/i915: Expose per-engine client busyness Tvrtko Ursulin
2018-02-14 19:17   ` Chris Wilson
2018-02-15  9:41     ` Tvrtko Ursulin
2018-02-15  9:44       ` Chris Wilson
2018-02-15 15:13         ` Tvrtko Ursulin
2018-02-14 18:50 ` [RFC 5/5] drm/i915: Add sysfs toggle to enable per-client engine stats Tvrtko Ursulin
2018-02-14 18:55 ` ✗ Fi.CI.CHECKPATCH: warning for Per-client " Patchwork
2018-02-14 19:11 ` ✓ Fi.CI.BAT: success " Patchwork
2018-02-14 19:20 ` [RFC 0/5] " Chris Wilson
2018-02-15  9:44   ` Tvrtko Ursulin
2018-02-15  9:47     ` Chris Wilson
2018-02-15 10:50       ` Tvrtko Ursulin
2018-02-15  2:19 ` ✓ Fi.CI.IGT: success for " Patchwork
2019-10-25 14:21 [RFC 0/5] Per client engine busyness (all aboard the sysfs train!) Tvrtko Ursulin
2019-10-25 14:21 ` [RFC 2/5] drm/i915: Expose list of clients in sysfs Tvrtko Ursulin
2019-10-25 14:35   ` Chris Wilson

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.