public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] perf: Avoid the regular drm_open_driver exithandler
@ 2020-02-25 11:44 Chris Wilson
  2020-02-25 11:51 ` [igt-dev] [Intel-gfx] " Petri Latvala
  2020-02-25 13:39 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2020-02-25 11:44 UTC (permalink / raw)
  To: intel-gfx; +Cc: igt-dev

Due to the way i915_perf_open() works, it installs a wakeref on the fd.
This wakeref prevents the normal drm_open_driver() exithandler from
returning (as that waits for all wakerefs to ensure the GPU is idle). We
need to manually control the nesting of cleanup, and so need to use
__drm_open_driver() to avoid the default exithandler.

References: https://gitlab.freedesktop.org/drm/intel/issues/1085#note_419148
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/perf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/perf.c b/tests/perf.c
index 7b11f668c..869e5f1e9 100644
--- a/tests/perf.c
+++ b/tests/perf.c
@@ -4489,7 +4489,8 @@ igt_main
 		 */
 		igt_assert_eq(drm_fd, -1);
 
-		drm_fd = drm_open_driver(DRIVER_INTEL);
+		/* Avoid the normal exithandler, our perf-fd interferes */
+		drm_fd = __drm_open_driver(DRIVER_INTEL);
 		igt_require_gem(drm_fd);
 
 		devid = intel_get_drm_devid(drm_fd);
-- 
2.25.1

_______________________________________________
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

* Re: [igt-dev] [Intel-gfx] [PATCH i-g-t] perf: Avoid the regular drm_open_driver exithandler
  2020-02-25 11:44 [igt-dev] [PATCH i-g-t] perf: Avoid the regular drm_open_driver exithandler Chris Wilson
@ 2020-02-25 11:51 ` Petri Latvala
  2020-02-25 13:39 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Petri Latvala @ 2020-02-25 11:51 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev, intel-gfx

On Tue, Feb 25, 2020 at 11:44:54AM +0000, Chris Wilson wrote:
> Due to the way i915_perf_open() works, it installs a wakeref on the fd.
> This wakeref prevents the normal drm_open_driver() exithandler from
> returning (as that waits for all wakerefs to ensure the GPU is idle). We
> need to manually control the nesting of cleanup, and so need to use
> __drm_open_driver() to avoid the default exithandler.
> 
> References: https://gitlab.freedesktop.org/drm/intel/issues/1085#note_419148
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Petri Latvala <petri.latvala@intel.com>


> ---
>  tests/perf.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/perf.c b/tests/perf.c
> index 7b11f668c..869e5f1e9 100644
> --- a/tests/perf.c
> +++ b/tests/perf.c
> @@ -4489,7 +4489,8 @@ igt_main
>  		 */
>  		igt_assert_eq(drm_fd, -1);
>  
> -		drm_fd = drm_open_driver(DRIVER_INTEL);
> +		/* Avoid the normal exithandler, our perf-fd interferes */
> +		drm_fd = __drm_open_driver(DRIVER_INTEL);
>  		igt_require_gem(drm_fd);
>  
>  		devid = intel_get_drm_devid(drm_fd);
> -- 
> 2.25.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
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

* [igt-dev] ✓ Fi.CI.BAT: success for perf: Avoid the regular drm_open_driver exithandler
  2020-02-25 11:44 [igt-dev] [PATCH i-g-t] perf: Avoid the regular drm_open_driver exithandler Chris Wilson
  2020-02-25 11:51 ` [igt-dev] [Intel-gfx] " Petri Latvala
@ 2020-02-25 13:39 ` Patchwork
  1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2020-02-25 13:39 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

== Series Details ==

Series: perf: Avoid the regular drm_open_driver exithandler
URL   : https://patchwork.freedesktop.org/series/73897/
State : success

== Summary ==

CI Bug Log - changes from IGT_5465 -> IGTPW_4222
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@gem_render_linear_blits@basic:
    - fi-tgl-y:           [PASS][1] -> [DMESG-WARN][2] ([CI#94] / [i915#402]) +1 similar issue
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5465/fi-tgl-y/igt@gem_render_linear_blits@basic.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4222/fi-tgl-y/igt@gem_render_linear_blits@basic.html

  
#### Possible fixes ####

  * igt@i915_selftest@live_gem_contexts:
    - fi-cfl-guc:         [INCOMPLETE][3] ([fdo#106070] / [i915#424]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5465/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4222/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html

  * igt@prime_vgem@basic-fence-wait-default:
    - fi-tgl-y:           [DMESG-WARN][5] ([CI#94] / [i915#402]) -> [PASS][6] +1 similar issue
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5465/fi-tgl-y/igt@prime_vgem@basic-fence-wait-default.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4222/fi-tgl-y/igt@prime_vgem@basic-fence-wait-default.html

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

  [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94
  [fdo#106070]: https://bugs.freedesktop.org/show_bug.cgi?id=106070
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
  [i915#424]: https://gitlab.freedesktop.org/drm/intel/issues/424
  [i915#460]: https://gitlab.freedesktop.org/drm/intel/issues/460


Participating hosts (51 -> 45)
------------------------------

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


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5465 -> IGTPW_4222

  CI-20190529: 20190529
  CI_DRM_8004: 1a2e0cce5af4a9ad9694995610ed64578ccc430f @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4222: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4222/index.html
  IGT_5465: c719274a5e3a31d5b44aed433ef3833a536a507a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4222/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:[~2020-02-25 13:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-25 11:44 [igt-dev] [PATCH i-g-t] perf: Avoid the regular drm_open_driver exithandler Chris Wilson
2020-02-25 11:51 ` [igt-dev] [Intel-gfx] " Petri Latvala
2020-02-25 13:39 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork

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