* [PATCH i-g-t 0/1] tests/intel/xe_create: create-contexts subtest
@ 2023-12-08 9:05 Lukasz Laguna
2023-12-08 9:05 ` [PATCH i-g-t 1/1] " Lukasz Laguna
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Lukasz Laguna @ 2023-12-08 9:05 UTC (permalink / raw)
To: igt-dev
Validates the creation of significant number of HW contexts (4096 as
default). The number of contexts to create can be adjusted using command
line '-Q' parameter representing resource quantity.
Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com>
Lukasz Laguna (1):
tests/intel/xe_create: create-contexts subtest
tests/intel/xe_create.c | 65 ++++++++++++++++++++++++++++++++---------
1 file changed, 51 insertions(+), 14 deletions(-)
--
2.40.0
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH i-g-t 1/1] tests/intel/xe_create: create-contexts subtest 2023-12-08 9:05 [PATCH i-g-t 0/1] tests/intel/xe_create: create-contexts subtest Lukasz Laguna @ 2023-12-08 9:05 ` Lukasz Laguna 2023-12-11 15:33 ` Bernatowicz, Marcin 2023-12-08 11:05 ` ✗ Fi.CI.BAT: failure for " Patchwork 2023-12-08 11:57 ` ✓ CI.xeBAT: success " Patchwork 2 siblings, 1 reply; 5+ messages in thread From: Lukasz Laguna @ 2023-12-08 9:05 UTC (permalink / raw) To: igt-dev Validates the creation of significant number of HW contexts (4096 as default). The number of contexts to create can be adjusted using command line '-Q' parameter representing resource quantity. Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com> --- tests/intel/xe_create.c | 65 ++++++++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 14 deletions(-) diff --git a/tests/intel/xe_create.c b/tests/intel/xe_create.c index cef9db23d..45b0c116c 100644 --- a/tests/intel/xe_create.c +++ b/tests/intel/xe_create.c @@ -19,11 +19,11 @@ #define PAGE_SIZE 0x1000 static struct param { - unsigned int size_mb; - unsigned int vram_percent; + unsigned int quantity; + unsigned int percent; } params = { - .size_mb = 0, - .vram_percent = 100, + .quantity = 0, + .percent = 100, }; static int __create_bo(int fd, uint32_t vm, uint64_t size, uint32_t placement, @@ -244,8 +244,8 @@ static void create_big_vram(int fd, int gt) visible_avail_size = xe_visible_available_vram_size(fd, gt); igt_require(visible_avail_size); - bo_size = params.size_mb ? params.size_mb * 1024ULL * 1024ULL - : ALIGN_DOWN(visible_avail_size * params.vram_percent / 100, alignment); + bo_size = params.quantity ? params.quantity * 1024ULL * 1024ULL + : ALIGN_DOWN(visible_avail_size * params.percent / 100, alignment); igt_require(bo_size); igt_info("gt%u bo_size=%lu visible_available_vram_size=%lu\n", gt, bo_size, visible_avail_size); @@ -268,16 +268,49 @@ static void create_big_vram(int fd, int gt) xe_vm_destroy(fd, vm); } +/** + * SUBTEST: create-contexts + * Functionality: contexts creation + * Test category: functionality test + * Description: Verifies the creation of substantial number of HW contexts + * (4096 as default). + */ +static void create_contexts(int fd) +{ + unsigned int i, n = params.quantity ? params.quantity : 4096; + uint64_t bo_size = xe_get_default_alignment(fd), bo_addr = 0x1a0000; + uint32_t vm, bo, *batch, exec_queues[n]; + + vm = xe_vm_create(fd, DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE, 0); + bo = xe_bo_create(fd, vm, bo_size, system_memory(fd), 0); + + batch = xe_bo_map(fd, bo, bo_size); + *batch = MI_BATCH_BUFFER_END; + munmap(batch, bo_size); + + xe_vm_bind_sync(fd, vm, bo, 0, bo_addr, bo_size); + + for (i = 0; i < n; i++) { + exec_queues[i] = xe_exec_queue_create(fd, vm, &xe_engine(fd, 0)->instance, 0); + xe_exec_wait(fd, exec_queues[i], bo_addr); + } + + for (i = 0; i < n; i++) + xe_exec_queue_destroy(fd, exec_queues[i]); + gem_close(fd, bo); + xe_vm_destroy(fd, vm); +} + static int opt_handler(int opt, int opt_index, void *data) { switch (opt) { - case 'S': - params.size_mb = atoi(optarg); - igt_debug("Size MB: %d\n", params.size_mb); + case 'Q': + params.quantity = atoi(optarg); + igt_debug("Resource quantity (memory in MB): %d\n", params.quantity); break; case 'p': - params.vram_percent = atoi(optarg); - igt_debug("Percent of VRAM: %d\n", params.vram_percent); + params.percent = atoi(optarg); + igt_debug("Percent of available resource: %d\n", params.percent); break; default: return IGT_OPT_HANDLER_ERROR; @@ -287,11 +320,11 @@ static int opt_handler(int opt, int opt_index, void *data) } const char *help_str = - " -S\tBO size in MB\n" - " -p\tPercent of VRAM for BO\n" + " -Q\tresource quantity (memory in MB)\n" + " -p\tpercent of available resource\n" ; -igt_main_args("S:p:", NULL, help_str, opt_handler, NULL) +igt_main_args("Q:p:", NULL, help_str, opt_handler, NULL) { int xe; @@ -322,6 +355,10 @@ igt_main_args("S:p:", NULL, help_str, opt_handler, NULL) create_big_vram(xe, gt); } + igt_subtest("create-contexts") { + create_contexts(xe); + } + igt_subtest("multigpu-create-massive-size") { int gpu_count = drm_prepare_filtered_multigpu(DRIVER_XE); -- 2.40.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH i-g-t 1/1] tests/intel/xe_create: create-contexts subtest 2023-12-08 9:05 ` [PATCH i-g-t 1/1] " Lukasz Laguna @ 2023-12-11 15:33 ` Bernatowicz, Marcin 0 siblings, 0 replies; 5+ messages in thread From: Bernatowicz, Marcin @ 2023-12-11 15:33 UTC (permalink / raw) To: Lukasz Laguna, igt-dev Hi Lukasz, On 12/8/2023 10:05 AM, Lukasz Laguna wrote: > Validates the creation of significant number of HW contexts (4096 as > default). The number of contexts to create can be adjusted using command > line '-Q' parameter representing resource quantity. > > Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com> > --- > tests/intel/xe_create.c | 65 ++++++++++++++++++++++++++++++++--------- > 1 file changed, 51 insertions(+), 14 deletions(-) > > diff --git a/tests/intel/xe_create.c b/tests/intel/xe_create.c > index cef9db23d..45b0c116c 100644 > --- a/tests/intel/xe_create.c > +++ b/tests/intel/xe_create.c > @@ -19,11 +19,11 @@ > #define PAGE_SIZE 0x1000 > > static struct param { > - unsigned int size_mb; > - unsigned int vram_percent; > + unsigned int quantity; > + unsigned int percent; > } params = { > - .size_mb = 0, > - .vram_percent = 100, > + .quantity = 0, > + .percent = 100, > }; > > static int __create_bo(int fd, uint32_t vm, uint64_t size, uint32_t placement, > @@ -244,8 +244,8 @@ static void create_big_vram(int fd, int gt) > visible_avail_size = xe_visible_available_vram_size(fd, gt); > igt_require(visible_avail_size); > > - bo_size = params.size_mb ? params.size_mb * 1024ULL * 1024ULL > - : ALIGN_DOWN(visible_avail_size * params.vram_percent / 100, alignment); > + bo_size = params.quantity ? params.quantity * 1024ULL * 1024ULL > + : ALIGN_DOWN(visible_avail_size * params.percent / 100, alignment); > igt_require(bo_size); > igt_info("gt%u bo_size=%lu visible_available_vram_size=%lu\n", > gt, bo_size, visible_avail_size); > @@ -268,16 +268,49 @@ static void create_big_vram(int fd, int gt) > xe_vm_destroy(fd, vm); > } > > +/** > + * SUBTEST: create-contexts > + * Functionality: contexts creation > + * Test category: functionality test > + * Description: Verifies the creation of substantial number of HW contexts > + * (4096 as default). > + */ > +static void create_contexts(int fd) > +{ > + unsigned int i, n = params.quantity ? params.quantity : 4096; > + uint64_t bo_size = xe_get_default_alignment(fd), bo_addr = 0x1a0000; > + uint32_t vm, bo, *batch, exec_queues[n]; > + > + vm = xe_vm_create(fd, DRM_XE_VM_CREATE_FLAG_SCRATCH_PAGE, 0); > + bo = xe_bo_create(fd, vm, bo_size, system_memory(fd), 0); > + > + batch = xe_bo_map(fd, bo, bo_size); > + *batch = MI_BATCH_BUFFER_END; > + munmap(batch, bo_size); > + > + xe_vm_bind_sync(fd, vm, bo, 0, bo_addr, bo_size); > + > + for (i = 0; i < n; i++) { > + exec_queues[i] = xe_exec_queue_create(fd, vm, &xe_engine(fd, 0)->instance, 0); > + xe_exec_wait(fd, exec_queues[i], bo_addr); > + } Perhaps it would be beneficial to include information about which iteration the failure occurs in, if any. Other than that LGTM. -- marcin > + > + for (i = 0; i < n; i++) > + xe_exec_queue_destroy(fd, exec_queues[i]); > + gem_close(fd, bo); > + xe_vm_destroy(fd, vm); > +} > + > static int opt_handler(int opt, int opt_index, void *data) > { > switch (opt) { > - case 'S': > - params.size_mb = atoi(optarg); > - igt_debug("Size MB: %d\n", params.size_mb); > + case 'Q': > + params.quantity = atoi(optarg); > + igt_debug("Resource quantity (memory in MB): %d\n", params.quantity); > break; > case 'p': > - params.vram_percent = atoi(optarg); > - igt_debug("Percent of VRAM: %d\n", params.vram_percent); > + params.percent = atoi(optarg); > + igt_debug("Percent of available resource: %d\n", params.percent); > break; > default: > return IGT_OPT_HANDLER_ERROR; > @@ -287,11 +320,11 @@ static int opt_handler(int opt, int opt_index, void *data) > } > > const char *help_str = > - " -S\tBO size in MB\n" > - " -p\tPercent of VRAM for BO\n" > + " -Q\tresource quantity (memory in MB)\n" > + " -p\tpercent of available resource\n" > ; > > -igt_main_args("S:p:", NULL, help_str, opt_handler, NULL) > +igt_main_args("Q:p:", NULL, help_str, opt_handler, NULL) > { > int xe; > > @@ -322,6 +355,10 @@ igt_main_args("S:p:", NULL, help_str, opt_handler, NULL) > create_big_vram(xe, gt); > } > > + igt_subtest("create-contexts") { > + create_contexts(xe); > + } > + > igt_subtest("multigpu-create-massive-size") { > int gpu_count = drm_prepare_filtered_multigpu(DRIVER_XE); > ^ permalink raw reply [flat|nested] 5+ messages in thread
* ✗ Fi.CI.BAT: failure for tests/intel/xe_create: create-contexts subtest 2023-12-08 9:05 [PATCH i-g-t 0/1] tests/intel/xe_create: create-contexts subtest Lukasz Laguna 2023-12-08 9:05 ` [PATCH i-g-t 1/1] " Lukasz Laguna @ 2023-12-08 11:05 ` Patchwork 2023-12-08 11:57 ` ✓ CI.xeBAT: success " Patchwork 2 siblings, 0 replies; 5+ messages in thread From: Patchwork @ 2023-12-08 11:05 UTC (permalink / raw) To: Lukasz Laguna; +Cc: igt-dev [-- Attachment #1: Type: text/plain, Size: 6079 bytes --] == Series Details == Series: tests/intel/xe_create: create-contexts subtest URL : https://patchwork.freedesktop.org/series/127558/ State : failure == Summary == CI Bug Log - changes from CI_DRM_13998 -> IGTPW_10381 ==================================================== Summary ------- **FAILURE** Serious unknown changes coming with IGTPW_10381 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in IGTPW_10381, 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_10381/index.html Participating hosts (35 -> 35) ------------------------------ Additional (1): bat-dg2-8 Missing (1): fi-snb-2520m Possible new issues ------------------- Here are the unknown changes that may have been introduced in IGTPW_10381: ### IGT changes ### #### Possible regressions #### * igt@kms_busy@basic@flip: - bat-adlp-11: NOTRUN -> [ABORT][1] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/bat-adlp-11/igt@kms_busy@basic@flip.html - bat-dg2-8: NOTRUN -> [INCOMPLETE][2] [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/bat-dg2-8/igt@kms_busy@basic@flip.html - bat-jsl-1: NOTRUN -> [INCOMPLETE][3] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/bat-jsl-1/igt@kms_busy@basic@flip.html * igt@kms_force_connector_basic@force-connector-state: - fi-kbl-guc: NOTRUN -> [ABORT][4] [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/fi-kbl-guc/igt@kms_force_connector_basic@force-connector-state.html Known issues ------------ Here are the changes found in IGTPW_10381 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@debugfs_test@basic-hwmon: - bat-adlp-11: NOTRUN -> [SKIP][5] ([i915#9318]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/bat-adlp-11/igt@debugfs_test@basic-hwmon.html - bat-jsl-1: NOTRUN -> [SKIP][6] ([i915#9318]) [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/bat-jsl-1/igt@debugfs_test@basic-hwmon.html * igt@fbdev@info: - fi-kbl-guc: NOTRUN -> [SKIP][7] ([fdo#109271] / [i915#1849]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/fi-kbl-guc/igt@fbdev@info.html * igt@gem_huc_copy@huc-copy: - bat-jsl-1: NOTRUN -> [SKIP][8] ([i915#2190]) [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/bat-jsl-1/igt@gem_huc_copy@huc-copy.html * igt@gem_mmap@basic: - bat-dg2-8: NOTRUN -> [SKIP][9] ([i915#4083]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/bat-dg2-8/igt@gem_mmap@basic.html * igt@gem_mmap_gtt@basic: - bat-dg2-8: NOTRUN -> [SKIP][10] ([i915#4077]) +2 other tests skip [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/bat-dg2-8/igt@gem_mmap_gtt@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_10381/bat-dg2-8/igt@gem_tiled_pread_basic.html - bat-adlp-11: NOTRUN -> [SKIP][12] ([i915#3282]) [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/bat-adlp-11/igt@gem_tiled_pread_basic.html * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy: - bat-dg2-8: NOTRUN -> [SKIP][13] ([i915#5190]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/bat-dg2-8/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html * igt@kms_addfb_basic@basic-y-tiled-legacy: - bat-dg2-8: NOTRUN -> [SKIP][14] ([i915#4215] / [i915#5190]) [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/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][15] ([i915#4212]) +6 other tests skip [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/bat-dg2-8/igt@kms_addfb_basic@framebuffer-vs-set-tiling.html * igt@kms_addfb_basic@tile-pitch-mismatch: - bat-dg2-8: NOTRUN -> [SKIP][16] ([i915#4212] / [i915#5608]) [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/bat-dg2-8/igt@kms_addfb_basic@tile-pitch-mismatch.html * igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size: - fi-kbl-guc: NOTRUN -> [SKIP][17] ([fdo#109271]) +18 other tests skip [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/fi-kbl-guc/igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size.html [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849 [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190 [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282 [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#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212 [i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215 [i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190 [i915#5608]: https://gitlab.freedesktop.org/drm/intel/issues/5608 [i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318 Build changes ------------- * CI: CI-20190529 -> None * IGT: IGT_7628 -> IGTPW_10381 CI-20190529: 20190529 CI_DRM_13998: 25a1f5a87b8a320992918d224a548bb13a68c378 @ git://anongit.freedesktop.org/gfx-ci/linux IGTPW_10381: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/index.html IGT_7628: 431c2d2dd5828b25fcbe1c82afbac865f4771aee @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git Testlist changes ---------------- +igt@xe_create@create-contexts == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/index.html [-- Attachment #2: Type: text/html, Size: 7366 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* ✓ CI.xeBAT: success for tests/intel/xe_create: create-contexts subtest 2023-12-08 9:05 [PATCH i-g-t 0/1] tests/intel/xe_create: create-contexts subtest Lukasz Laguna 2023-12-08 9:05 ` [PATCH i-g-t 1/1] " Lukasz Laguna 2023-12-08 11:05 ` ✗ Fi.CI.BAT: failure for " Patchwork @ 2023-12-08 11:57 ` Patchwork 2 siblings, 0 replies; 5+ messages in thread From: Patchwork @ 2023-12-08 11:57 UTC (permalink / raw) To: Lukasz Laguna; +Cc: igt-dev [-- Attachment #1: Type: text/plain, Size: 1714 bytes --] == Series Details == Series: tests/intel/xe_create: create-contexts subtest URL : https://patchwork.freedesktop.org/series/127558/ State : success == Summary == CI Bug Log - changes from XEIGT_7628_BAT -> XEIGTPW_10381_BAT ==================================================== Summary ------- **SUCCESS** No regressions found. Participating hosts (4 -> 4) ------------------------------ No changes in participating hosts Known issues ------------ Here are the changes found in XEIGTPW_10381_BAT that come from known issues: ### IGT changes ### #### Possible fixes #### * igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size: - bat-adlp-7: [FAIL][1] ([i915#2346]) -> [PASS][2] [1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7628/bat-adlp-7/igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size.html [2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10381/bat-adlp-7/igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size.html [i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346 Build changes ------------- * IGT: IGT_7628 -> IGTPW_10381 * Linux: xe-558-2a7dcf14d4abe82a88d846a3bf875e0611d83b04 -> xe-561-c4235ef53c0265159d2c5f34459a3b6c37ab1995 IGTPW_10381: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10381/index.html IGT_7628: 431c2d2dd5828b25fcbe1c82afbac865f4771aee @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git xe-558-2a7dcf14d4abe82a88d846a3bf875e0611d83b04: 2a7dcf14d4abe82a88d846a3bf875e0611d83b04 xe-561-c4235ef53c0265159d2c5f34459a3b6c37ab1995: c4235ef53c0265159d2c5f34459a3b6c37ab1995 == Logs == For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10381/index.html [-- Attachment #2: Type: text/html, Size: 2294 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-12-11 15:33 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-12-08 9:05 [PATCH i-g-t 0/1] tests/intel/xe_create: create-contexts subtest Lukasz Laguna 2023-12-08 9:05 ` [PATCH i-g-t 1/1] " Lukasz Laguna 2023-12-11 15:33 ` Bernatowicz, Marcin 2023-12-08 11:05 ` ✗ Fi.CI.BAT: failure for " Patchwork 2023-12-08 11:57 ` ✓ 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