All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] i915/gem_exec_schedule: Handle package power RAPL unavailability
@ 2019-10-22 11:39 ` Chris Wilson
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2019-10-22 11:39 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

It turns out that not all platforms have working package power.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112094
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/igt_rapl.h                 |  6 ++++++
 tests/i915/gem_exec_schedule.c | 16 +++++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/lib/igt_rapl.h b/lib/igt_rapl.h
index 55c46198e..13f4f88a7 100644
--- a/lib/igt_rapl.h
+++ b/lib/igt_rapl.h
@@ -56,6 +56,11 @@ static inline int pkg_power_open(struct rapl *r)
 	return rapl_open(r, "pkg");
 }
 
+static inline bool rapl_valid(struct rapl *r)
+{
+	return r->fd >= 0;
+}
+
 static inline int ram_power_open(struct rapl *r)
 {
 	return rapl_open(r, "ram");
@@ -69,6 +74,7 @@ static inline bool rapl_read(struct rapl *r, struct power_sample *s)
 static inline void rapl_close(struct rapl *r)
 {
 	close(r->fd);
+	r->fd = -1;
 }
 
 static inline double power_J(const struct rapl *r,
diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index 9a2f2352b..8695cbe9d 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -1611,8 +1611,8 @@ static void measure_semaphore_power(int i915)
 	unsigned int engine, signaler;
 	struct rapl gpu, pkg;
 
-	igt_require(pkg_power_open(&pkg) == 0);
 	igt_require(gpu_power_open(&gpu) == 0);
+	pkg_power_open(&pkg);
 
 	for_each_physical_engine(i915, signaler) {
 		struct {
@@ -1665,12 +1665,14 @@ static void measure_semaphore_power(int i915)
 			 1e3 * (total - baseline),
 			 1e3 * total);
 
-		baseline = power_W(&pkg, &s_spin[0].pkg, &s_spin[1].pkg);
-		total = power_W(&pkg, &s_sema[0].pkg, &s_sema[1].pkg);
-		igt_info("pkg: %.1fmW + %.1fmW (total %1.fmW)\n",
-			 1e3 * baseline,
-			 1e3 * (total - baseline),
-			 1e3 * total);
+		if (rapl_valid(&pkg)) {
+			baseline = power_W(&pkg, &s_spin[0].pkg, &s_spin[1].pkg);
+			total = power_W(&pkg, &s_sema[0].pkg, &s_sema[1].pkg);
+			igt_info("pkg: %.1fmW + %.1fmW (total %1.fmW)\n",
+				 1e3 * baseline,
+				 1e3 * (total - baseline),
+				 1e3 * total);
+		}
 	}
 
 	rapl_close(&gpu);
-- 
2.24.0.rc0

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

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

* [igt-dev] [PATCH i-g-t] i915/gem_exec_schedule: Handle package power RAPL unavailability
@ 2019-10-22 11:39 ` Chris Wilson
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Wilson @ 2019-10-22 11:39 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

It turns out that not all platforms have working package power.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112094
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/igt_rapl.h                 |  6 ++++++
 tests/i915/gem_exec_schedule.c | 16 +++++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/lib/igt_rapl.h b/lib/igt_rapl.h
index 55c46198e..13f4f88a7 100644
--- a/lib/igt_rapl.h
+++ b/lib/igt_rapl.h
@@ -56,6 +56,11 @@ static inline int pkg_power_open(struct rapl *r)
 	return rapl_open(r, "pkg");
 }
 
+static inline bool rapl_valid(struct rapl *r)
+{
+	return r->fd >= 0;
+}
+
 static inline int ram_power_open(struct rapl *r)
 {
 	return rapl_open(r, "ram");
@@ -69,6 +74,7 @@ static inline bool rapl_read(struct rapl *r, struct power_sample *s)
 static inline void rapl_close(struct rapl *r)
 {
 	close(r->fd);
+	r->fd = -1;
 }
 
 static inline double power_J(const struct rapl *r,
diff --git a/tests/i915/gem_exec_schedule.c b/tests/i915/gem_exec_schedule.c
index 9a2f2352b..8695cbe9d 100644
--- a/tests/i915/gem_exec_schedule.c
+++ b/tests/i915/gem_exec_schedule.c
@@ -1611,8 +1611,8 @@ static void measure_semaphore_power(int i915)
 	unsigned int engine, signaler;
 	struct rapl gpu, pkg;
 
-	igt_require(pkg_power_open(&pkg) == 0);
 	igt_require(gpu_power_open(&gpu) == 0);
+	pkg_power_open(&pkg);
 
 	for_each_physical_engine(i915, signaler) {
 		struct {
@@ -1665,12 +1665,14 @@ static void measure_semaphore_power(int i915)
 			 1e3 * (total - baseline),
 			 1e3 * total);
 
-		baseline = power_W(&pkg, &s_spin[0].pkg, &s_spin[1].pkg);
-		total = power_W(&pkg, &s_sema[0].pkg, &s_sema[1].pkg);
-		igt_info("pkg: %.1fmW + %.1fmW (total %1.fmW)\n",
-			 1e3 * baseline,
-			 1e3 * (total - baseline),
-			 1e3 * total);
+		if (rapl_valid(&pkg)) {
+			baseline = power_W(&pkg, &s_spin[0].pkg, &s_spin[1].pkg);
+			total = power_W(&pkg, &s_sema[0].pkg, &s_sema[1].pkg);
+			igt_info("pkg: %.1fmW + %.1fmW (total %1.fmW)\n",
+				 1e3 * baseline,
+				 1e3 * (total - baseline),
+				 1e3 * total);
+		}
 	}
 
 	rapl_close(&gpu);
-- 
2.24.0.rc0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✗ Fi.CI.BAT: failure for i915/gem_exec_schedule: Handle package power RAPL unavailability
  2019-10-22 11:39 ` [igt-dev] " Chris Wilson
  (?)
@ 2019-10-22 12:27 ` Patchwork
  -1 siblings, 0 replies; 3+ messages in thread
From: Patchwork @ 2019-10-22 12:27 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: i915/gem_exec_schedule: Handle package power RAPL unavailability
URL   : https://patchwork.freedesktop.org/series/68386/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_7148 -> IGTPW_3593
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_3593 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_3593, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3593/index.html

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in IGTPW_3593:

### IGT changes ###

#### Possible regressions ####

  * igt@i915_module_load@reload-with-fault-injection:
    - fi-skl-6770hq:      [PASS][1] -> [INCOMPLETE][2]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7148/fi-skl-6770hq/igt@i915_module_load@reload-with-fault-injection.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3593/fi-skl-6770hq/igt@i915_module_load@reload-with-fault-injection.html

  
Known issues
------------

  Here are the changes found in IGTPW_3593 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_exec_suspend@basic-s4-devices:
    - fi-icl-u3:          [PASS][3] -> [DMESG-WARN][4] ([fdo#107724])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7148/fi-icl-u3/igt@gem_exec_suspend@basic-s4-devices.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3593/fi-icl-u3/igt@gem_exec_suspend@basic-s4-devices.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [PASS][5] -> [FAIL][6] ([fdo#111045] / [fdo#111096])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7148/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3593/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-hsw-peppy:       [PASS][7] -> [DMESG-WARN][8] ([fdo#102614])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7148/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3593/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html

  
#### Possible fixes ####

  * igt@gem_ctx_switch@rcs0:
    - fi-cml-u:           [INCOMPLETE][9] ([fdo#110566]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7148/fi-cml-u/igt@gem_ctx_switch@rcs0.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3593/fi-cml-u/igt@gem_ctx_switch@rcs0.html

  * {igt@i915_selftest@live_gt_heartbeat}:
    - fi-cfl-8109u:       [DMESG-FAIL][11] -> [PASS][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7148/fi-cfl-8109u/igt@i915_selftest@live_gt_heartbeat.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3593/fi-cfl-8109u/igt@i915_selftest@live_gt_heartbeat.html

  * {igt@i915_selftest@live_gt_timelines}:
    - {fi-tgl-u2}:        [INCOMPLETE][13] ([fdo#111831]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7148/fi-tgl-u2/igt@i915_selftest@live_gt_timelines.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3593/fi-tgl-u2/igt@i915_selftest@live_gt_timelines.html

  * igt@prime_vgem@basic-wait-default:
    - fi-icl-u3:          [DMESG-WARN][15] ([fdo#107724]) -> [PASS][16] +2 similar issues
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7148/fi-icl-u3/igt@prime_vgem@basic-wait-default.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3593/fi-icl-u3/igt@prime_vgem@basic-wait-default.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614
  [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
  [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [fdo#109100]: https://bugs.freedesktop.org/show_bug.cgi?id=109100
  [fdo#110566]: https://bugs.freedesktop.org/show_bug.cgi?id=110566
  [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045
  [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
  [fdo#111831]: https://bugs.freedesktop.org/show_bug.cgi?id=111831


Participating hosts (53 -> 46)
------------------------------

  Missing    (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_5235 -> IGTPW_3593

  CI-20190529: 20190529
  CI_DRM_7148: cc7475464cbd00166d72d4fc0d0e4de432f32c7c @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3593: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3593/index.html
  IGT_5235: da9abbab69be80dd00812a4607a4ea2dffcc4544 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3593/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2019-10-22 12:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-22 11:39 [PATCH i-g-t] i915/gem_exec_schedule: Handle package power RAPL unavailability Chris Wilson
2019-10-22 11:39 ` [igt-dev] " Chris Wilson
2019-10-22 12:27 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork

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.