All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Intel-gfx@lists.freedesktop.org
Subject: [RFC 0/5] Per client engine busyness (all aboard the sysfs train!)
Date: Fri, 25 Oct 2019 15:21:26 +0100	[thread overview]
Message-ID: <20191025142131.17378-1-tvrtko.ursulin@linux.intel.com> (raw)

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

WARNING: multiple messages have this Message-ID (diff)
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [RFC 0/5] Per client engine busyness (all aboard the sysfs train!)
Date: Fri, 25 Oct 2019 15:21:26 +0100	[thread overview]
Message-ID: <20191025142131.17378-1-tvrtko.ursulin@linux.intel.com> (raw)
Message-ID: <20191025142126.ILK9P89xR46byncjbmvAXWqHjrGQ6VMJIJj_Vd87xBY@z> (raw)

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

             reply	other threads:[~2019-10-25 14:21 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25 14:21 Tvrtko Ursulin [this message]
2019-10-25 14:21 ` [Intel-gfx] [RFC 0/5] Per client engine busyness (all aboard the sysfs train!) Tvrtko Ursulin
2019-10-25 14:21 ` [RFC 1/5] drm/i915: Track per-context engine busyness Tvrtko Ursulin
2019-10-25 14:21   ` [Intel-gfx] " Tvrtko Ursulin
2019-10-25 14:21 ` [RFC 2/5] drm/i915: Expose list of clients in sysfs Tvrtko Ursulin
2019-10-25 14:21   ` [Intel-gfx] " Tvrtko Ursulin
2019-10-25 14:35   ` Chris Wilson
2019-10-25 14:35     ` [Intel-gfx] " Chris Wilson
2019-10-25 14:21 ` [RFC 3/5] drm/i915: Update client name on context create Tvrtko Ursulin
2019-10-25 14:21   ` [Intel-gfx] " Tvrtko Ursulin
2019-10-25 14:39   ` Chris Wilson
2019-10-25 14:39     ` [Intel-gfx] " Chris Wilson
2019-10-25 14:21 ` [RFC 4/5] drm/i915: Expose per-engine client busyness Tvrtko Ursulin
2019-10-25 14:21   ` [Intel-gfx] " Tvrtko Ursulin
2019-10-25 14:42   ` Chris Wilson
2019-10-25 14:42     ` [Intel-gfx] " Chris Wilson
2019-10-25 14:21 ` [RFC 5/5] drm/i915: Add sysfs toggle to enable per-client engine stats Tvrtko Ursulin
2019-10-25 14:21   ` [Intel-gfx] " Tvrtko Ursulin
2019-10-25 14:49   ` Chris Wilson
2019-10-25 14:49     ` [Intel-gfx] " Chris Wilson
2019-10-25 19:45 ` ✗ Fi.CI.CHECKPATCH: warning for Per client engine busyness (all aboard the sysfs train!) Patchwork
2019-10-25 19:45   ` [Intel-gfx] " Patchwork
2019-10-25 20:12 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-10-25 20:12   ` [Intel-gfx] " 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=20191025142131.17378-1-tvrtko.ursulin@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --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.