Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 0/5] Update IGT tests to support new engine busyness interface
@ 2023-09-22 21:52 Umesh Nerlige Ramappa
  2023-09-22 21:52 ` [igt-dev] [PATCH i-g-t 1/5] i915/pmu: Add helpers to convert ticks to ns Umesh Nerlige Ramappa
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Umesh Nerlige Ramappa @ 2023-09-22 21:52 UTC (permalink / raw)
  To: igt-dev

MTL introduces a new mechanism to query engine busyness from GuC that is less
error prone and does not need the KMD to extend counters to 64 bits. This means
KMD can get rid of the worker that regularly updates counters to 64 bits and is
a simpler implementation.

GuC provides 2 counters to calculate busyness:

(1) xxxx-busy-ticks that provides engine busyness in ticks
(2) total-active-ticks[-gtN] that provides how long the gt has been active

The 2 values enable user to calculate the busyness % as follows:

busyness % = (delta xxxx-busy-ticks * 100) / (delta total-active-ticks)

Update IGT tests to use this new interface.

While this simplifies the implemantation and reduces a bunch of races that
existed with current upstream version, the granularity for the active busyness
of an engine is now 100 ms. Any higher granularity will add overhead to GuC
since GuC is periodically updating this busyness.

Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>

Umesh Nerlige Ramappa (5):
  i915/pmu: Add helpers to convert ticks to ns
  i915/pmu: Pass config directly to the init test
  i915/pmu: Switch to new busyness counter if old one is unavailable
  lib/i915: Export engine to gt mapping
  i915/pmu: Add a new test to use total_active_ticks for busyness

 lib/i915/gem_engine_topology.c |   2 +-
 lib/i915/gem_engine_topology.h |   1 +
 lib/i915/i915_drm_local.h      |  10 ++
 tests/intel/perf_pmu.c         | 276 +++++++++++++++++++++++++++------
 4 files changed, 241 insertions(+), 48 deletions(-)

-- 
2.38.1

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

end of thread, other threads:[~2023-09-23  0:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-22 21:52 [igt-dev] [PATCH i-g-t 0/5] Update IGT tests to support new engine busyness interface Umesh Nerlige Ramappa
2023-09-22 21:52 ` [igt-dev] [PATCH i-g-t 1/5] i915/pmu: Add helpers to convert ticks to ns Umesh Nerlige Ramappa
2023-09-22 21:52 ` [igt-dev] [PATCH i-g-t 2/5] i915/pmu: Pass config directly to the init test Umesh Nerlige Ramappa
2023-09-22 21:52 ` [igt-dev] [PATCH i-g-t 3/5] i915/pmu: Switch to new busyness counter if old one is unavailable Umesh Nerlige Ramappa
2023-09-22 21:52 ` [igt-dev] [PATCH i-g-t 4/5] lib/i915: Export engine to gt mapping Umesh Nerlige Ramappa
2023-09-22 21:52 ` [igt-dev] [PATCH i-g-t 5/5] i915/pmu: Add a new test to use total_active_ticks for busyness Umesh Nerlige Ramappa
2023-09-22 22:18   ` Umesh Nerlige Ramappa
2023-09-22 22:58 ` [igt-dev] ✗ Fi.CI.BAT: failure for Update IGT tests to support new engine busyness interface Patchwork
2023-09-23  0:04 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox