All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/xe_create: Unthread create-execqueues tests
@ 2023-12-05 21:10 Jonathan Cavitt
  2023-12-05 22:26 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jonathan Cavitt @ 2023-12-05 21:10 UTC (permalink / raw)
  To: igt-dev; +Cc: lucas.demarchi, jonathan.cavitt, saurabhg.gupta

The inclusion of igt_fork in the test is designed to improve performance
by multithreading the process of execqueue creation.  However, after
each execqueue is created on a thread, a context switch appears to occur,
causing all the execqueues created for that thread to be stored in memory
and all the execqueues for the other thread to be loaded.  At scale, the
delays caused by repeated memory loads and unloads actually cause a
reduction in performance, and as such it's actually more performant to
create the execqueues serially rather than rely on forking.

Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
CC: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
CC: Kamil Konieczny <kamil.konieczny@linux.intel.com>
CC: Lucas de Marchi <lucas.demarchi@intel.com>
CC: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
---
 tests/intel/xe_create.c | 51 +++++++++++++++++------------------------
 1 file changed, 21 insertions(+), 30 deletions(-)

diff --git a/tests/intel/xe_create.c b/tests/intel/xe_create.c
index bbdddc7c9b..f4a80aa155 100644
--- a/tests/intel/xe_create.c
+++ b/tests/intel/xe_create.c
@@ -136,47 +136,38 @@ static uint32_t __xe_exec_queue_create(int fd, uint32_t vm,
 static void create_execqueues(int fd, enum exec_queue_destroy ed)
 {
 	struct timespec tv = { };
-	uint32_t num_engines, exec_queues_per_process, vm;
-	int nproc = sysconf(_SC_NPROCESSORS_ONLN), seconds;
+	struct drm_xe_engine *engine;
+	uint32_t num_engines, vm;
+	int idx, err, i, seconds;
+	uint32_t exec_queue, exec_queues[MAXEXECQUEUES];
 
 	fd = drm_reopen_driver(fd);
 	num_engines = xe_number_engines(fd);
 	vm = xe_vm_create(fd, DRM_XE_VM_CREATE_FLAG_ASYNC_DEFAULT, 0);
 
-	exec_queues_per_process = max_t(uint32_t, 1, MAXEXECQUEUES / nproc);
-	igt_debug("nproc: %u, exec_queues per process: %u\n", nproc, exec_queues_per_process);
 
 	igt_nsec_elapsed(&tv);
 
-	igt_fork(n, nproc) {
-		struct drm_xe_engine *engine;
-		uint32_t exec_queue, exec_queues[exec_queues_per_process];
-		int idx, err, i;
-
-		srandom(n);
-
-		for (i = 0; i < exec_queues_per_process; i++) {
-			idx = rand() % num_engines;
-			engine = xe_engine(fd, idx);
-			err = __xe_exec_queue_create(fd, vm, &engine->instance,
-						     0, &exec_queue);
-			igt_debug("[%2d] Create exec_queue: err=%d, exec_queue=%u [idx = %d]\n",
-				  n, err, exec_queue, i);
-			if (err)
-				break;
-
-			if (ed == NOLEAK)
-				exec_queues[i] = exec_queue;
-		}
+	for (i = 0; i < MAXEXECQUEUES; i++) {
+		idx = rand() % num_engines;
+		engine = xe_engine(fd, idx);
+		err = __xe_exec_queue_create(fd, vm, &engine->instance,
+					     0, &exec_queue);
+		igt_debug("Create exec_queue: err=%d, exec_queue=%u [idx = %d]\n",
+			  err, exec_queue, i);
+		if (err)
+			break;
+
+		if (ed == NOLEAK)
+			exec_queues[i] = exec_queue;
+	}
 
-		if (ed == NOLEAK) {
-			while (--i >= 0) {
-				igt_debug("[%2d] Destroy exec_queue: %u\n", n, exec_queues[i]);
-				xe_exec_queue_destroy(fd, exec_queues[i]);
-			}
+	if (ed == NOLEAK) {
+		while (--i >= 0) {
+			igt_debug("Destroy exec_queue: %u\n", exec_queues[i]);
+			xe_exec_queue_destroy(fd, exec_queues[i]);
 		}
 	}
-	igt_waitchildren();
 
 	xe_vm_destroy(fd, vm);
 	drm_close_driver(fd);
-- 
2.25.1

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

* [igt-dev] ✗ Fi.CI.BAT: failure for tests/xe_create: Unthread create-execqueues tests
  2023-12-05 21:10 [igt-dev] [PATCH i-g-t] tests/xe_create: Unthread create-execqueues tests Jonathan Cavitt
@ 2023-12-05 22:26 ` Patchwork
  2023-12-05 23:49 ` [igt-dev] ✗ CI.xeBAT: " Patchwork
  2023-12-07  7:39 ` [igt-dev] [PATCH i-g-t] " Zbigniew Kempczyński
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2023-12-05 22:26 UTC (permalink / raw)
  To: Jonathan Cavitt; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 11432 bytes --]

== Series Details ==

Series: tests/xe_create: Unthread create-execqueues tests
URL   : https://patchwork.freedesktop.org/series/127389/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_13983 -> IGTPW_10345
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with IGTPW_10345 absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in IGTPW_10345, please notify your bug team (I915-ci-infra@lists.freedesktop.org) 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_10345/index.html

Participating hosts (35 -> 34)
------------------------------

  Additional (2): bat-dg2-8 bat-mtlp-8 
  Missing    (3): bat-kbl-2 bat-adlp-11 fi-snb-2520m 

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
    - bat-adlp-9:         NOTRUN -> [SKIP][1] +2 other tests skip
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-adlp-9/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence.html

  * igt@kms_psr@psr_cursor_plane_move:
    - bat-mtlp-8:         NOTRUN -> [SKIP][2] +3 other tests skip
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@kms_psr@psr_cursor_plane_move.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@core_hotunplug@unbind-rebind:
    - bat-mtlp-8:         NOTRUN -> [ABORT][3] ([i915#8213] / [i915#8668])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@core_hotunplug@unbind-rebind.html
    - bat-dg2-8:          NOTRUN -> [ABORT][4] ([i915#8213])
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@core_hotunplug@unbind-rebind.html

  * igt@debugfs_test@basic-hwmon:
    - bat-mtlp-8:         NOTRUN -> [SKIP][5] ([i915#9318])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@debugfs_test@basic-hwmon.html

  * igt@gem_mmap@basic:
    - bat-mtlp-8:         NOTRUN -> [SKIP][6] ([i915#4083])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@gem_mmap@basic.html
    - bat-dg2-8:          NOTRUN -> [SKIP][7] ([i915#4083])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@gem_mmap@basic.html

  * igt@gem_mmap_gtt@basic:
    - bat-mtlp-8:         NOTRUN -> [SKIP][8] ([i915#4077]) +2 other tests skip
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@gem_mmap_gtt@basic.html
    - bat-dg2-8:          NOTRUN -> [SKIP][9] ([i915#4077]) +2 other tests skip
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@gem_mmap_gtt@basic.html

  * igt@gem_render_tiled_blits@basic:
    - bat-mtlp-8:         NOTRUN -> [SKIP][10] ([i915#4079]) +1 other test skip
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@gem_render_tiled_blits@basic.html

  * igt@gem_tiled_pread_basic:
    - bat-dg2-8:          NOTRUN -> [SKIP][11] ([i915#4079]) +1 other test skip
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@gem_tiled_pread_basic.html

  * igt@i915_pm_rps@basic-api:
    - bat-mtlp-8:         NOTRUN -> [SKIP][12] ([i915#6621])
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@i915_pm_rps@basic-api.html
    - bat-dg2-8:          NOTRUN -> [SKIP][13] ([i915#6621])
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@i915_pm_rps@basic-api.html

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
    - bat-mtlp-8:         NOTRUN -> [SKIP][14] ([i915#5190])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html
    - bat-dg2-8:          NOTRUN -> [SKIP][15] ([i915#5190])
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html

  * igt@kms_addfb_basic@basic-y-tiled-legacy:
    - bat-mtlp-8:         NOTRUN -> [SKIP][16] ([i915#4212]) +8 other tests skip
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@kms_addfb_basic@basic-y-tiled-legacy.html
    - bat-dg2-8:          NOTRUN -> [SKIP][17] ([i915#4215] / [i915#5190])
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@kms_addfb_basic@basic-y-tiled-legacy.html

  * igt@kms_addfb_basic@framebuffer-vs-set-tiling:
    - bat-dg2-8:          NOTRUN -> [SKIP][18] ([i915#4212]) +6 other tests skip
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@kms_addfb_basic@framebuffer-vs-set-tiling.html

  * igt@kms_addfb_basic@tile-pitch-mismatch:
    - bat-dg2-8:          NOTRUN -> [SKIP][19] ([i915#4212] / [i915#5608])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@kms_addfb_basic@tile-pitch-mismatch.html

  * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
    - bat-mtlp-8:         NOTRUN -> [SKIP][20] ([i915#4213]) +1 other test skip
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html
    - bat-dg2-8:          NOTRUN -> [SKIP][21] ([i915#4103] / [i915#4213] / [i915#5608]) +1 other test skip
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy.html

  * igt@kms_dsc@dsc-basic:
    - bat-mtlp-8:         NOTRUN -> [SKIP][22] ([i915#3555] / [i915#3840] / [i915#9159])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@kms_dsc@dsc-basic.html

  * igt@kms_force_connector_basic@force-load-detect:
    - bat-mtlp-8:         NOTRUN -> [SKIP][23] ([fdo#109285])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@kms_force_connector_basic@force-load-detect.html
    - bat-dg2-8:          NOTRUN -> [SKIP][24] ([fdo#109285])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@kms_force_connector_basic@force-load-detect.html

  * igt@kms_force_connector_basic@prune-stale-modes:
    - bat-mtlp-8:         NOTRUN -> [SKIP][25] ([i915#5274])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@kms_force_connector_basic@prune-stale-modes.html
    - bat-dg2-8:          NOTRUN -> [SKIP][26] ([i915#5274])
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@kms_force_connector_basic@prune-stale-modes.html

  * igt@kms_pm_backlight@basic-brightness:
    - bat-dg2-8:          NOTRUN -> [SKIP][27] ([i915#5354])
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@kms_pm_backlight@basic-brightness.html

  * igt@kms_psr@psr_cursor_plane_move:
    - bat-dg2-8:          NOTRUN -> [SKIP][28] ([i915#9673] / [i915#9736]) +3 other tests skip
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@kms_psr@psr_cursor_plane_move.html

  * igt@kms_setmode@basic-clone-single-crtc:
    - bat-mtlp-8:         NOTRUN -> [SKIP][29] ([i915#3555] / [i915#8809])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@kms_setmode@basic-clone-single-crtc.html
    - bat-dg2-8:          NOTRUN -> [SKIP][30] ([i915#3555])
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@kms_setmode@basic-clone-single-crtc.html

  * igt@prime_vgem@basic-fence-flip:
    - bat-dg2-8:          NOTRUN -> [SKIP][31] ([i915#3708])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@prime_vgem@basic-fence-flip.html

  * igt@prime_vgem@basic-fence-mmap:
    - bat-dg2-8:          NOTRUN -> [SKIP][32] ([i915#3708] / [i915#4077]) +1 other test skip
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@prime_vgem@basic-fence-mmap.html
    - bat-mtlp-8:         NOTRUN -> [SKIP][33] ([i915#3708] / [i915#4077]) +1 other test skip
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@prime_vgem@basic-fence-mmap.html

  * igt@prime_vgem@basic-fence-read:
    - bat-mtlp-8:         NOTRUN -> [SKIP][34] ([i915#3708]) +2 other tests skip
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-mtlp-8/igt@prime_vgem@basic-fence-read.html

  * igt@prime_vgem@basic-write:
    - bat-dg2-8:          NOTRUN -> [SKIP][35] ([i915#3291] / [i915#3708]) +2 other tests skip
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/bat-dg2-8/igt@prime_vgem@basic-write.html

  
#### Possible fixes ####

  * igt@kms_hdmi_inject@inject-audio:
    - fi-kbl-guc:         [FAIL][36] ([IGT#3]) -> [PASS][37]
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13983/fi-kbl-guc/igt@kms_hdmi_inject@inject-audio.html
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/fi-kbl-guc/igt@kms_hdmi_inject@inject-audio.html

  
  [IGT#3]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/3
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
  [i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
  [i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
  [i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
  [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
  [i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
  [i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
  [i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
  [i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
  [i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
  [i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
  [i915#5608]: https://gitlab.freedesktop.org/drm/intel/issues/5608
  [i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
  [i915#8213]: https://gitlab.freedesktop.org/drm/intel/issues/8213
  [i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668
  [i915#8809]: https://gitlab.freedesktop.org/drm/intel/issues/8809
  [i915#9159]: https://gitlab.freedesktop.org/drm/intel/issues/9159
  [i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318
  [i915#9673]: https://gitlab.freedesktop.org/drm/intel/issues/9673
  [i915#9736]: https://gitlab.freedesktop.org/drm/intel/issues/9736


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

  * CI: CI-20190529 -> None
  * IGT: IGT_7622 -> IGTPW_10345

  CI-20190529: 20190529
  CI_DRM_13983: a9d99261a978835b02e248fe18af3026416af3e8 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_10345: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/index.html
  IGT_7622: 48a47d91b7727215b965690c69d84159c8fb1aa2 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git


Testlist changes
----------------

-igt@xe_exec_basic@zero-execs
-igt@xe_vm@zero-binds

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/index.html

[-- Attachment #2: Type: text/html, Size: 14309 bytes --]

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

* [igt-dev] ✗ CI.xeBAT: failure for tests/xe_create: Unthread create-execqueues tests
  2023-12-05 21:10 [igt-dev] [PATCH i-g-t] tests/xe_create: Unthread create-execqueues tests Jonathan Cavitt
  2023-12-05 22:26 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
@ 2023-12-05 23:49 ` Patchwork
  2023-12-07  7:39 ` [igt-dev] [PATCH i-g-t] " Zbigniew Kempczyński
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2023-12-05 23:49 UTC (permalink / raw)
  To: Jonathan Cavitt; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 4466 bytes --]

== Series Details ==

Series: tests/xe_create: Unthread create-execqueues tests
URL   : https://patchwork.freedesktop.org/series/127389/
State : failure

== Summary ==

CI Bug Log - changes from XEIGT_7622_BAT -> XEIGTPW_10345_BAT
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with XEIGTPW_10345_BAT absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in XEIGTPW_10345_BAT, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (4 -> 4)
------------------------------

  No changes in participating hosts

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

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

### IGT changes ###

#### Possible regressions ####

  * igt@xe_prime_self_import@basic-with_fd_dup:
    - bat-atsm-2:         [PASS][1] -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7622/bat-atsm-2/igt@xe_prime_self_import@basic-with_fd_dup.html
   [2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10345/bat-atsm-2/igt@xe_prime_self_import@basic-with_fd_dup.html

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

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

### IGT changes ###

#### Issues hit ####

  * igt@kms_pipe_crc_basic@hang-read-crc:
    - bat-dg2-oem2:       [PASS][3] -> [DMESG-WARN][4] ([Intel XE#282] / [i915#2017]) +5 other tests dmesg-warn
   [3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7622/bat-dg2-oem2/igt@kms_pipe_crc_basic@hang-read-crc.html
   [4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10345/bat-dg2-oem2/igt@kms_pipe_crc_basic@hang-read-crc.html

  
#### Possible fixes ####

  * igt@kms_flip@basic-flip-vs-wf_vblank@a-dp3:
    - bat-dg2-oem2:       [FAIL][5] ([Intel XE#480]) -> [PASS][6] +1 other test pass
   [5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7622/bat-dg2-oem2/igt@kms_flip@basic-flip-vs-wf_vblank@a-dp3.html
   [6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10345/bat-dg2-oem2/igt@kms_flip@basic-flip-vs-wf_vblank@a-dp3.html

  * igt@xe_create@create-execqueues-noleak:
    - bat-adlp-7:         [FAIL][7] ([Intel XE#524]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7622/bat-adlp-7/igt@xe_create@create-execqueues-noleak.html
   [8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10345/bat-adlp-7/igt@xe_create@create-execqueues-noleak.html
    - bat-atsm-2:         [FAIL][9] ([Intel XE#524]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7622/bat-atsm-2/igt@xe_create@create-execqueues-noleak.html
   [10]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10345/bat-atsm-2/igt@xe_create@create-execqueues-noleak.html

  
#### Warnings ####

  * igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12:
    - bat-dg2-oem2:       [FAIL][11] ([Intel XE#400] / [Intel XE#616]) -> [DMESG-FAIL][12] ([Intel XE#282] / [i915#2017]) +1 other test dmesg-fail
   [11]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7622/bat-dg2-oem2/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12.html
   [12]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10345/bat-dg2-oem2/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12.html

  
  [Intel XE#282]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/282
  [Intel XE#400]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/400
  [Intel XE#480]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/480
  [Intel XE#524]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/524
  [Intel XE#616]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/616
  [i915#2017]: https://gitlab.freedesktop.org/drm/intel/issues/2017


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

  * IGT: IGT_7622 -> IGTPW_10345
  * Linux: xe-550-ac7b89571d802765762e7c15d78a6dcd5d92c41b -> xe-551-176c42b6ba690d4c84e37f151e832d5520a38354

  IGTPW_10345: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10345/index.html
  IGT_7622: 48a47d91b7727215b965690c69d84159c8fb1aa2 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  xe-550-ac7b89571d802765762e7c15d78a6dcd5d92c41b: ac7b89571d802765762e7c15d78a6dcd5d92c41b
  xe-551-176c42b6ba690d4c84e37f151e832d5520a38354: 176c42b6ba690d4c84e37f151e832d5520a38354

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10345/index.html

[-- Attachment #2: Type: text/html, Size: 5377 bytes --]

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

* Re: [igt-dev] [PATCH i-g-t] tests/xe_create: Unthread create-execqueues tests
  2023-12-05 21:10 [igt-dev] [PATCH i-g-t] tests/xe_create: Unthread create-execqueues tests Jonathan Cavitt
  2023-12-05 22:26 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
  2023-12-05 23:49 ` [igt-dev] ✗ CI.xeBAT: " Patchwork
@ 2023-12-07  7:39 ` Zbigniew Kempczyński
  2 siblings, 0 replies; 4+ messages in thread
From: Zbigniew Kempczyński @ 2023-12-07  7:39 UTC (permalink / raw)
  To: Jonathan Cavitt; +Cc: igt-dev, saurabhg.gupta, lucas.demarchi

On Tue, Dec 05, 2023 at 01:10:20PM -0800, Jonathan Cavitt wrote:
> The inclusion of igt_fork in the test is designed to improve performance
> by multithreading the process of execqueue creation.  However, after
> each execqueue is created on a thread, a context switch appears to occur,
> causing all the execqueues created for that thread to be stored in memory
> and all the execqueues for the other thread to be loaded.  At scale, the
> delays caused by repeated memory loads and unloads actually cause a
> reduction in performance, and as such it's actually more performant to
> create the execqueues serially rather than rely on forking.

Test is hostile and tries to mimic process concurrency on creation/deletion
of execqueues. I've observed two bad behaviors - first kernel lockup for two
minutes on 'LEAK' version (destroying execqueues is triggered by closing drm
fd). In this case system was totally unresponding but not crashed. After ~2
minutes it became responsive again. Increasing number of execqueues makes
this unresponsive time longer). Second thing is timely non-linear behavior.

So your change can't be accepted as it hides the problem described above.

Question is - what are limits we agree - MAXTIME/MAXEXECQUEUES?

--
Zbigniew

> 
> Signed-off-by: Jonathan Cavitt <jonathan.cavitt@intel.com>
> CC: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> CC: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> CC: Lucas de Marchi <lucas.demarchi@intel.com>
> CC: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
> ---
>  tests/intel/xe_create.c | 51 +++++++++++++++++------------------------
>  1 file changed, 21 insertions(+), 30 deletions(-)
> 
> diff --git a/tests/intel/xe_create.c b/tests/intel/xe_create.c
> index bbdddc7c9b..f4a80aa155 100644
> --- a/tests/intel/xe_create.c
> +++ b/tests/intel/xe_create.c
> @@ -136,47 +136,38 @@ static uint32_t __xe_exec_queue_create(int fd, uint32_t vm,
>  static void create_execqueues(int fd, enum exec_queue_destroy ed)
>  {
>  	struct timespec tv = { };
> -	uint32_t num_engines, exec_queues_per_process, vm;
> -	int nproc = sysconf(_SC_NPROCESSORS_ONLN), seconds;
> +	struct drm_xe_engine *engine;
> +	uint32_t num_engines, vm;
> +	int idx, err, i, seconds;
> +	uint32_t exec_queue, exec_queues[MAXEXECQUEUES];
>  
>  	fd = drm_reopen_driver(fd);
>  	num_engines = xe_number_engines(fd);
>  	vm = xe_vm_create(fd, DRM_XE_VM_CREATE_FLAG_ASYNC_DEFAULT, 0);
>  
> -	exec_queues_per_process = max_t(uint32_t, 1, MAXEXECQUEUES / nproc);
> -	igt_debug("nproc: %u, exec_queues per process: %u\n", nproc, exec_queues_per_process);
>  
>  	igt_nsec_elapsed(&tv);
>  
> -	igt_fork(n, nproc) {
> -		struct drm_xe_engine *engine;
> -		uint32_t exec_queue, exec_queues[exec_queues_per_process];
> -		int idx, err, i;
> -
> -		srandom(n);
> -
> -		for (i = 0; i < exec_queues_per_process; i++) {
> -			idx = rand() % num_engines;
> -			engine = xe_engine(fd, idx);
> -			err = __xe_exec_queue_create(fd, vm, &engine->instance,
> -						     0, &exec_queue);
> -			igt_debug("[%2d] Create exec_queue: err=%d, exec_queue=%u [idx = %d]\n",
> -				  n, err, exec_queue, i);
> -			if (err)
> -				break;
> -
> -			if (ed == NOLEAK)
> -				exec_queues[i] = exec_queue;
> -		}
> +	for (i = 0; i < MAXEXECQUEUES; i++) {
> +		idx = rand() % num_engines;
> +		engine = xe_engine(fd, idx);
> +		err = __xe_exec_queue_create(fd, vm, &engine->instance,
> +					     0, &exec_queue);
> +		igt_debug("Create exec_queue: err=%d, exec_queue=%u [idx = %d]\n",
> +			  err, exec_queue, i);
> +		if (err)
> +			break;
> +
> +		if (ed == NOLEAK)
> +			exec_queues[i] = exec_queue;
> +	}
>  
> -		if (ed == NOLEAK) {
> -			while (--i >= 0) {
> -				igt_debug("[%2d] Destroy exec_queue: %u\n", n, exec_queues[i]);
> -				xe_exec_queue_destroy(fd, exec_queues[i]);
> -			}
> +	if (ed == NOLEAK) {
> +		while (--i >= 0) {
> +			igt_debug("Destroy exec_queue: %u\n", exec_queues[i]);
> +			xe_exec_queue_destroy(fd, exec_queues[i]);
>  		}
>  	}
> -	igt_waitchildren();
>  
>  	xe_vm_destroy(fd, vm);
>  	drm_close_driver(fd);
> -- 
> 2.25.1
> 

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

end of thread, other threads:[~2023-12-07  7:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-05 21:10 [igt-dev] [PATCH i-g-t] tests/xe_create: Unthread create-execqueues tests Jonathan Cavitt
2023-12-05 22:26 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2023-12-05 23:49 ` [igt-dev] ✗ CI.xeBAT: " Patchwork
2023-12-07  7:39 ` [igt-dev] [PATCH i-g-t] " Zbigniew Kempczyński

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.