Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: John.C.Harrison@Intel.com
To: Intel-GFX@Lists.FreeDesktop.Org
Cc: DRI-Devel@Lists.FreeDesktop.Org
Subject: [Intel-gfx] [PATCH 0/3] Engine busyness v2
Date: Fri, 22 Sep 2023 15:25:07 -0700	[thread overview]
Message-ID: <20230922222510.2235213-1-John.C.Harrison@Intel.com> (raw)

From: John Harrison <John.C.Harrison@Intel.com>

The latest GuC implements a new and improved scheme for tracking
engine busyness. So make use of it.

Note that this change comes along with a new set of PMU counters. The
old counters have a fundamental problem that they are defined in terms
of wall time but the sampling is now all done by the GPU in terms of
clock ticks. This leads to issues with timebase conversion, some of
which are non-trivial.

For existing platforms, the old counters will still be updated by the
new scheme and will still suffer all the same issues. For newer
platforms (MTL onwards), the old counters are no longer supported.

Instead, there is a new set of tick based counters. These include the
actual busyness count per engine plus a total ticks count. The
intention is that they should be queried as an atomic pair and used
together to determine a busyness percentage. No assumptions may be made
about tick frequencies or relations to wall time.

Test-with: 20230922215233.2438200-1-umesh.nerlige.ramappa@intel.com
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>


John Harrison (1):
  drm/i915/guc: Support new and improved engine busyness

Umesh Nerlige Ramappa (2):
  drm/i915/mtl: Add a PMU counter for total active ticks
  drm/i915/mtl: Add counters for engine busyness ticks

 drivers/gpu/drm/i915/gt/intel_engine.h        |   1 +
 drivers/gpu/drm/i915/gt/intel_engine_cs.c     |  16 +
 drivers/gpu/drm/i915/gt/intel_engine_types.h  |  16 +-
 drivers/gpu/drm/i915/gt/intel_engine_user.c   |   1 +
 .../gpu/drm/i915/gt/uc/abi/guc_actions_abi.h  |   4 +-
 drivers/gpu/drm/i915/gt/uc/intel_guc.h        |  82 ++--
 drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c    |  55 ++-
 drivers/gpu/drm/i915/gt/uc/intel_guc_ads.h    |   9 +-
 drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h   |  23 +-
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 460 ++++++++++++++----
 .../gpu/drm/i915/gt/uc/intel_guc_submission.h |   1 +
 drivers/gpu/drm/i915/i915_pmu.c               |  31 +-
 drivers/gpu/drm/i915/i915_pmu.h               |   2 +-
 include/uapi/drm/i915_drm.h                   |  15 +-
 14 files changed, 570 insertions(+), 146 deletions(-)

-- 
2.41.0


             reply	other threads:[~2023-09-22 22:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22 22:25 John.C.Harrison [this message]
2023-09-22 22:25 ` [Intel-gfx] [PATCH 1/3] drm/i915/guc: Support new and improved engine busyness John.C.Harrison
2023-10-03 20:58   ` Umesh Nerlige Ramappa
2023-10-06 22:28     ` John Harrison
2023-09-22 22:25 ` [Intel-gfx] [PATCH 2/3] drm/i915/mtl: Add a PMU counter for total active ticks John.C.Harrison
2023-09-25  8:40   ` Tvrtko Ursulin
2023-09-27 22:52     ` Umesh Nerlige Ramappa
2023-09-22 22:25 ` [Intel-gfx] [PATCH 3/3] drm/i915/mtl: Add counters for engine busyness ticks John.C.Harrison
2023-09-25  8:28   ` Tvrtko Ursulin
2023-10-19 16:21   ` Dong, Zhanjun
2023-10-19 19:56     ` John Harrison
2023-09-23  5:00 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Engine busyness v2 Patchwork
2023-09-23  5:00 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-09-23  5:13 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2023-09-24  9:55 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=20230922222510.2235213-1-John.C.Harrison@Intel.com \
    --to=john.c.harrison@intel.com \
    --cc=DRI-Devel@Lists.FreeDesktop.Org \
    --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