* [PATCH] xe_exec_compute_mode: Add malloc-ufence test
@ 2024-02-27 2:39 Matthew Brost
2024-02-27 2:54 ` ✗ Fi.CI.BUILD: failure for " Patchwork
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Matthew Brost @ 2024-02-27 2:39 UTC (permalink / raw)
To: igt-dev; +Cc: Matthew Brost
The get user page ufence path is not triggered by the test as ufence
memory is a mapped BO. To trigger this path use a malloc'd address.
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
---
tests/intel/xe_exec_compute_mode.c | 28 ++++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)
diff --git a/tests/intel/xe_exec_compute_mode.c b/tests/intel/xe_exec_compute_mode.c
index 7dad715093..c0cddbc02b 100644
--- a/tests/intel/xe_exec_compute_mode.c
+++ b/tests/intel/xe_exec_compute_mode.c
@@ -31,6 +31,7 @@
#define BIND_EXECQUEUE (0x1 << 4)
#define VM_FOR_BO (0x1 << 5)
#define EXEC_QUEUE_EARLY (0x1 << 6)
+#define MALLOC_USER_FENCE (0x1 <<7)
/**
* SUBTEST: twice-%s
@@ -48,6 +49,7 @@
* arg[1]:
*
* @basic: basic
+ * @malloc-ufence: malloc user fence
* @preempt-fence-early: preempt fence early
* @userptr: userptr
* @rebind: rebind
@@ -110,6 +112,7 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
uint64_t exec_sync;
uint32_t data;
} *data;
+ uint64_t *vm_sync;
int i, j, b;
int map_fd = -1;
int64_t fence_timeout;
@@ -149,6 +152,12 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
}
memset(data, 0, bo_size);
+ if (flags & MALLOC_USER_FENCE)
+ vm_sync = malloc(sizeof(*vm_sync));
+ else
+ vm_sync = &data[0].vm_sync;
+ igt_assert(vm_sync);
+
for (i = 0; !(flags & EXEC_QUEUE_EARLY) && i < n_exec_queues; i++) {
exec_queues[i] = xe_exec_queue_create(fd, vm, eci, 0);
if (flags & BIND_EXECQUEUE)
@@ -158,7 +167,7 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
bind_exec_queues[i] = 0;
};
- sync[0].addr = to_user_pointer(&data[0].vm_sync);
+ sync[0].addr = to_user_pointer(vm_sync);
if (bo)
xe_vm_bind_async(fd, vm, bind_exec_queues[0], bo, 0, addr,
bo_size, sync, 1);
@@ -171,9 +180,9 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
fence_timeout = igt_run_in_simulation() ? HUNDRED_SEC : ONE_SEC;
- xe_wait_ufence(fd, &data[0].vm_sync, USER_FENCE_VALUE,
+ xe_wait_ufence(fd, vm_sync, USER_FENCE_VALUE,
bind_exec_queues[0], fence_timeout);
- data[0].vm_sync = 0;
+ *vm_sync = 0;
for (i = 0; i < n_execs; i++) {
uint64_t batch_offset = (char *)&data[i].batch - (char *)data;
@@ -202,7 +211,7 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
xe_vm_unbind_async(fd, vm, bind_exec_queues[e], 0,
addr, bo_size, NULL, 0);
- sync[0].addr = to_user_pointer(&data[0].vm_sync);
+ sync[0].addr = to_user_pointer(vm_sync);
addr += bo_size;
if (bo)
xe_vm_bind_async(fd, vm, bind_exec_queues[e], bo,
@@ -213,9 +222,9 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
to_user_pointer(data),
addr, bo_size, sync,
1);
- xe_wait_ufence(fd, &data[0].vm_sync, USER_FENCE_VALUE,
+ xe_wait_ufence(fd, vm_sync, USER_FENCE_VALUE,
bind_exec_queues[e], fence_timeout);
- data[0].vm_sync = 0;
+ *vm_sync = 0;
}
if (flags & INVALIDATE && i + 1 != n_execs) {
@@ -264,10 +273,10 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
if (flags & INVALIDATE)
usleep(250000);
- sync[0].addr = to_user_pointer(&data[0].vm_sync);
+ sync[0].addr = to_user_pointer(vm_sync);
xe_vm_unbind_async(fd, vm, bind_exec_queues[0], 0, addr, bo_size,
sync, 1);
- xe_wait_ufence(fd, &data[0].vm_sync, USER_FENCE_VALUE,
+ xe_wait_ufence(fd, vm_sync, USER_FENCE_VALUE,
bind_exec_queues[0], fence_timeout);
for (i = j; i < n_execs; i++)
@@ -288,6 +297,8 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
xe_vm_destroy(fd, vm);
if (map_fd != -1)
close(map_fd);
+ if (flags & MALLOC_USER_FENCE)
+ free(vm_sync);
}
/**
@@ -408,6 +419,7 @@ igt_main
unsigned int flags;
} sections[] = {
{ "basic", 0 },
+ { "malloc-ufence", MALLOC_USER_FENCE },
{ "preempt-fence-early", VM_FOR_BO | EXEC_QUEUE_EARLY },
{ "userptr", USERPTR },
{ "rebind", REBIND },
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* ✗ Fi.CI.BUILD: failure for xe_exec_compute_mode: Add malloc-ufence test
2024-02-27 2:39 [PATCH] xe_exec_compute_mode: Add malloc-ufence test Matthew Brost
@ 2024-02-27 2:54 ` Patchwork
2024-02-27 3:00 ` ✗ GitLab.Pipeline: warning " Patchwork
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2024-02-27 2:54 UTC (permalink / raw)
To: Matthew Brost; +Cc: igt-dev
== Series Details ==
Series: xe_exec_compute_mode: Add malloc-ufence test
URL : https://patchwork.freedesktop.org/series/130417/
State : failure
== Summary ==
IGT patchset build failed on latest successful build
17f897a81868fb35c6a7033a8b07256659742248 tests/amdgpu: refactor the ABM test to use the new sysfs interface
Tail of build.log:
Warning: igt@sysfs_heartbeat_interval@long Category documentation is missing
Warning: igt@sysfs_heartbeat_interval@long Sub-category documentation is missing
Warning: igt@sysfs_heartbeat_interval@long Functionality documentation is missing
Warning: igt@sysfs_heartbeat_interval@mixed Category documentation is missing
Warning: igt@sysfs_heartbeat_interval@mixed Sub-category documentation is missing
Warning: igt@sysfs_heartbeat_interval@mixed Functionality documentation is missing
Warning: igt@sysfs_heartbeat_interval@nopreempt Category documentation is missing
Warning: igt@sysfs_heartbeat_interval@nopreempt Sub-category documentation is missing
Warning: igt@sysfs_heartbeat_interval@nopreempt Functionality documentation is missing
Warning: igt@sysfs_heartbeat_interval@off Category documentation is missing
Warning: igt@sysfs_heartbeat_interval@off Sub-category documentation is missing
Warning: igt@sysfs_heartbeat_interval@off Functionality documentation is missing
Warning: igt@sysfs_heartbeat_interval@precise Category documentation is missing
Warning: igt@sysfs_heartbeat_interval@precise Sub-category documentation is missing
Warning: igt@sysfs_heartbeat_interval@precise Functionality documentation is missing
Warning: igt@sysfs_preempt_timeout@idempotent Category documentation is missing
Warning: igt@sysfs_preempt_timeout@idempotent Sub-category documentation is missing
Warning: igt@sysfs_preempt_timeout@idempotent Functionality documentation is missing
Warning: igt@sysfs_preempt_timeout@invalid Category documentation is missing
Warning: igt@sysfs_preempt_timeout@invalid Sub-category documentation is missing
Warning: igt@sysfs_preempt_timeout@invalid Functionality documentation is missing
Warning: igt@sysfs_preempt_timeout@off Category documentation is missing
Warning: igt@sysfs_preempt_timeout@off Sub-category documentation is missing
Warning: igt@sysfs_preempt_timeout@off Functionality documentation is missing
Warning: igt@sysfs_preempt_timeout@timeout Category documentation is missing
Warning: igt@sysfs_preempt_timeout@timeout Sub-category documentation is missing
Warning: igt@sysfs_preempt_timeout@timeout Functionality documentation is missing
Warning: igt@sysfs_timeslice_duration@duration Category documentation is missing
Warning: igt@sysfs_timeslice_duration@duration Sub-category documentation is missing
Warning: igt@sysfs_timeslice_duration@duration Functionality documentation is missing
Warning: igt@sysfs_timeslice_duration@idempotent Category documentation is missing
Warning: igt@sysfs_timeslice_duration@idempotent Sub-category documentation is missing
Warning: igt@sysfs_timeslice_duration@idempotent Functionality documentation is missing
Warning: igt@sysfs_timeslice_duration@invalid Category documentation is missing
Warning: igt@sysfs_timeslice_duration@invalid Sub-category documentation is missing
Warning: igt@sysfs_timeslice_duration@invalid Functionality documentation is missing
Warning: igt@sysfs_timeslice_duration@off Category documentation is missing
Warning: igt@sysfs_timeslice_duration@off Sub-category documentation is missing
Warning: igt@sysfs_timeslice_duration@off Functionality documentation is missing
Warning: igt@sysfs_timeslice_duration@timeout Category documentation is missing
Warning: igt@sysfs_timeslice_duration@timeout Sub-category documentation is missing
Warning: igt@sysfs_timeslice_duration@timeout Functionality documentation is missing
Warning: igt@vgem_basic@bad-fence Sub-category documentation is missing
Warning: igt@vgem_basic@bad-flag Sub-category documentation is missing
Warning: igt@vgem_basic@bad-handle Sub-category documentation is missing
Warning: igt@vgem_basic@bad-pad Sub-category documentation is missing
Warning: igt@vgem_basic@busy-fence Sub-category documentation is missing
[1662/1667] Generating kms_tests.rst with a custom command.
[1663/1667] Generating intel-ci-tests with a custom command.
ninja: build stopped: subcommand failed.
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✗ GitLab.Pipeline: warning for xe_exec_compute_mode: Add malloc-ufence test
2024-02-27 2:39 [PATCH] xe_exec_compute_mode: Add malloc-ufence test Matthew Brost
2024-02-27 2:54 ` ✗ Fi.CI.BUILD: failure for " Patchwork
@ 2024-02-27 3:00 ` Patchwork
2024-03-05 4:50 ` [PATCH] " Dandamudi, Priyanka
2024-03-05 14:31 ` Kamil Konieczny
3 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2024-02-27 3:00 UTC (permalink / raw)
To: Matthew Brost; +Cc: igt-dev
== Series Details ==
Series: xe_exec_compute_mode: Add malloc-ufence test
URL : https://patchwork.freedesktop.org/series/130417/
State : warning
== Summary ==
Pipeline status: FAILED.
see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1113673 for the overview.
build:tests-debian-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55537007):
[1782/1787] Compiling C object 'runner/527aa9f@@runner_test@exe/runner_tests.c.o'.
ninja: build stopped: subcommand failed.
ninja: Entering directory `build'
[1/819] Generating version.h with a custom command.
[2/8] Linking target runner/runner_test.
[3/8] Linking target assembler/intel-gen4asm.
[4/8] Generating kms_tests.html with a custom command.
[5/8] Generating i915_tests.html with a custom command.
[6/8] Generating xe_tests.rst with a custom command.
FAILED: docs/testplan/xe_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/xe_test_config.json --rest docs/testplan/xe_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: Missing documentation for igt@xe_exec_compute_mode@many-execqueues-malloc-ufence
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1709002503:step_script
section_start:1709002503:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1709002503:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55537002):
[1789/1793] Compiling C object 'runner/527aa9f@@runner_test@exe/runner_tests.c.o'.
ninja: build stopped: subcommand failed.
ninja: Entering directory `build'
[1/821] Generating version.h with a custom command.
[2/7] Linking target runner/runner_test.
[3/7] Generating kms_tests.html with a custom command.
[4/7] Generating i915_tests.html with a custom command.
[5/7] Generating intel-ci-tests with a custom command.
[6/7] Generating xe_tests.rst with a custom command.
FAILED: docs/testplan/xe_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/xe_test_config.json --rest docs/testplan/xe_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: Missing documentation for igt@xe_exec_compute_mode@many-execqueues-malloc-ufence
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1709002545:step_script
section_start:1709002545:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1709002545:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-clang has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55537006):
[1789/1793] Generating kms_tests.rst with a custom command.
[1790/1793] Generating intel-ci-tests with a custom command.
ninja: build stopped: subcommand failed.
ninja: Entering directory `build'
[1/821] Generating version.h with a custom command.
[2/6] Generating intel-ci-tests with a custom command.
[3/6] Generating i915_tests.html with a custom command.
[4/6] Generating kms_tests.html with a custom command.
[5/6] Generating xe_tests.rst with a custom command.
FAILED: docs/testplan/xe_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/xe_test_config.json --rest docs/testplan/xe_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: Missing documentation for igt@xe_exec_compute_mode@many-execqueues-malloc-ufence
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1709002562:step_script
section_start:1709002562:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1709002563:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-no-libdrm-nouveau has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55537005):
[1623/1627] Compiling C object 'runner/527aa9f@@runner_test@exe/runner_tests.c.o'.
ninja: build stopped: subcommand failed.
ninja: Entering directory `build'
[1/771] Generating version.h with a custom command.
[2/7] Linking target runner/runner_test.
[3/7] Generating kms_tests.html with a custom command.
[4/7] Generating i915_tests.html with a custom command.
[5/7] Generating intel-ci-tests with a custom command.
[6/7] Generating xe_tests.rst with a custom command.
FAILED: docs/testplan/xe_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/xe_test_config.json --rest docs/testplan/xe_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: Missing documentation for igt@xe_exec_compute_mode@many-execqueues-malloc-ufence
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1709002505:step_script
section_start:1709002505:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1709002505:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-no-libunwind has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55537003):
ninja: build stopped: subcommand failed.
ninja: Entering directory `build'
[1/821] Generating version.h with a custom command.
[2/8] Linking target runner/runner_test.
[3/8] Linking target assembler/intel-gen4asm.
[4/8] Generating i915_tests.html with a custom command.
[5/8] Generating kms_tests.html with a custom command.
[6/8] Generating intel-ci-tests with a custom command.
[7/8] Generating xe_tests.rst with a custom command.
FAILED: docs/testplan/xe_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/xe_test_config.json --rest docs/testplan/xe_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: Missing documentation for igt@xe_exec_compute_mode@many-execqueues-malloc-ufence
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1709002544:step_script
section_start:1709002544:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1709002545:cleanup_file_variables
ERROR: Job failed: exit code 1
build:tests-fedora-oldest-meson has failed (https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/jobs/55537004):
[1789/1793] Compiling C object 'runner/runner@@runner_test@exe/runner_tests.c.o'.
ninja: build stopped: subcommand failed.
ninja: Entering directory `build'
[1/821] Generating version.h with a custom command.
[2/7] Linking target runner/runner_test.
[3/7] Generating kms_tests.html with a custom command.
[4/7] Generating i915_tests.html with a custom command.
[5/7] Generating intel-ci-tests with a custom command.
[6/7] Generating xe_tests.rst with a custom command.
FAILED: docs/testplan/xe_tests.rst
/builds/gfx-ci/igt-ci-tags/scripts/igt_doc.py --config /builds/gfx-ci/igt-ci-tags/tests/intel/xe_test_config.json --rest docs/testplan/xe_tests.rst --check-testlist --igt-build-path /builds/gfx-ci/igt-ci-tags/build
Warning: Missing documentation for igt@xe_exec_compute_mode@many-execqueues-malloc-ufence
Please refer: docs/test_documentation.md for more details
ninja: build stopped: subcommand failed.
section_end:1709002542:step_script
section_start:1709002542:cleanup_file_variables
Cleaning up project directory and file based variables
section_end:1709002543:cleanup_file_variables
ERROR: Job failed: exit code 1
== Logs ==
For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/-/pipelines/1113673
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] xe_exec_compute_mode: Add malloc-ufence test
2024-02-27 2:39 [PATCH] xe_exec_compute_mode: Add malloc-ufence test Matthew Brost
2024-02-27 2:54 ` ✗ Fi.CI.BUILD: failure for " Patchwork
2024-02-27 3:00 ` ✗ GitLab.Pipeline: warning " Patchwork
@ 2024-03-05 4:50 ` Dandamudi, Priyanka
2024-03-05 14:31 ` Kamil Konieczny
3 siblings, 0 replies; 5+ messages in thread
From: Dandamudi, Priyanka @ 2024-03-05 4:50 UTC (permalink / raw)
To: Brost, Matthew, igt-dev; +Cc: Brost, Matthew
> -----Original Message-----
> From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of Matthew
> Brost
> Sent: Tuesday, February 27, 2024 8:10 AM
> To: igt-dev@lists.freedesktop.org
> Cc: Brost, Matthew <matthew.brost@intel.com>
> Subject: [PATCH] xe_exec_compute_mode: Add malloc-ufence test
>
> The get user page ufence path is not triggered by the test as ufence memory
> is a mapped BO. To trigger this path use a malloc'd address.
>
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> ---
> tests/intel/xe_exec_compute_mode.c | 28 ++++++++++++++++++++--------
> 1 file changed, 20 insertions(+), 8 deletions(-)
>
> diff --git a/tests/intel/xe_exec_compute_mode.c
> b/tests/intel/xe_exec_compute_mode.c
> index 7dad715093..c0cddbc02b 100644
> --- a/tests/intel/xe_exec_compute_mode.c
> +++ b/tests/intel/xe_exec_compute_mode.c
> @@ -31,6 +31,7 @@
> #define BIND_EXECQUEUE (0x1 << 4)
> #define VM_FOR_BO (0x1 << 5)
> #define EXEC_QUEUE_EARLY (0x1 << 6)
> +#define MALLOC_USER_FENCE (0x1 <<7)
>
> /**
> * SUBTEST: twice-%s
> @@ -48,6 +49,7 @@
> * arg[1]:
> *
> * @basic: basic
> + * @malloc-ufence: malloc user fence
> * @preempt-fence-early: preempt fence early
> * @userptr: userptr
> * @rebind: rebind
> @@ -110,6 +112,7 @@ test_exec(int fd, struct drm_xe_engine_class_instance
> *eci,
> uint64_t exec_sync;
> uint32_t data;
> } *data;
> + uint64_t *vm_sync;
> int i, j, b;
> int map_fd = -1;
> int64_t fence_timeout;
> @@ -149,6 +152,12 @@ test_exec(int fd, struct
> drm_xe_engine_class_instance *eci,
> }
> memset(data, 0, bo_size);
>
> + if (flags & MALLOC_USER_FENCE)
> + vm_sync = malloc(sizeof(*vm_sync));
> + else
> + vm_sync = &data[0].vm_sync;
> + igt_assert(vm_sync);
> +
> for (i = 0; !(flags & EXEC_QUEUE_EARLY) && i < n_exec_queues; i++) {
> exec_queues[i] = xe_exec_queue_create(fd, vm, eci, 0);
> if (flags & BIND_EXECQUEUE)
> @@ -158,7 +167,7 @@ test_exec(int fd, struct drm_xe_engine_class_instance
> *eci,
> bind_exec_queues[i] = 0;
> };
>
> - sync[0].addr = to_user_pointer(&data[0].vm_sync);
> + sync[0].addr = to_user_pointer(vm_sync);
> if (bo)
> xe_vm_bind_async(fd, vm, bind_exec_queues[0], bo, 0, addr,
> bo_size, sync, 1);
> @@ -171,9 +180,9 @@ test_exec(int fd, struct drm_xe_engine_class_instance
> *eci,
>
> fence_timeout = igt_run_in_simulation() ? HUNDRED_SEC : ONE_SEC;
>
> - xe_wait_ufence(fd, &data[0].vm_sync, USER_FENCE_VALUE,
> + xe_wait_ufence(fd, vm_sync, USER_FENCE_VALUE,
> bind_exec_queues[0], fence_timeout);
> - data[0].vm_sync = 0;
> + *vm_sync = 0;
>
> for (i = 0; i < n_execs; i++) {
> uint64_t batch_offset = (char *)&data[i].batch - (char *)data;
> @@ -202,7 +211,7 @@ test_exec(int fd, struct drm_xe_engine_class_instance
> *eci,
> xe_vm_unbind_async(fd, vm, bind_exec_queues[e],
> 0,
> addr, bo_size, NULL, 0);
>
> - sync[0].addr = to_user_pointer(&data[0].vm_sync);
> + sync[0].addr = to_user_pointer(vm_sync);
> addr += bo_size;
> if (bo)
> xe_vm_bind_async(fd, vm,
> bind_exec_queues[e], bo, @@ -213,9 +222,9 @@ test_exec(int fd, struct
> drm_xe_engine_class_instance *eci,
>
> to_user_pointer(data),
> addr, bo_size, sync,
> 1);
> - xe_wait_ufence(fd, &data[0].vm_sync,
> USER_FENCE_VALUE,
> + xe_wait_ufence(fd, vm_sync, USER_FENCE_VALUE,
> bind_exec_queues[e], fence_timeout);
> - data[0].vm_sync = 0;
> + *vm_sync = 0;
> }
>
> if (flags & INVALIDATE && i + 1 != n_execs) { @@ -264,10
> +273,10 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
> if (flags & INVALIDATE)
> usleep(250000);
>
> - sync[0].addr = to_user_pointer(&data[0].vm_sync);
> + sync[0].addr = to_user_pointer(vm_sync);
> xe_vm_unbind_async(fd, vm, bind_exec_queues[0], 0, addr, bo_size,
> sync, 1);
> - xe_wait_ufence(fd, &data[0].vm_sync, USER_FENCE_VALUE,
> + xe_wait_ufence(fd, vm_sync, USER_FENCE_VALUE,
> bind_exec_queues[0], fence_timeout);
>
> for (i = j; i < n_execs; i++)
> @@ -288,6 +297,8 @@ test_exec(int fd, struct drm_xe_engine_class_instance
> *eci,
> xe_vm_destroy(fd, vm);
> if (map_fd != -1)
> close(map_fd);
> + if (flags & MALLOC_USER_FENCE)
> + free(vm_sync);
> }
>
> /**
> @@ -408,6 +419,7 @@ igt_main
> unsigned int flags;
> } sections[] = {
> { "basic", 0 },
> + { "malloc-ufence", MALLOC_USER_FENCE },
> { "preempt-fence-early", VM_FOR_BO | EXEC_QUEUE_EARLY
> },
> { "userptr", USERPTR },
> { "rebind", REBIND },
> --
> 2.34.1
Change LGTM
Reviewed-by: Priyanka Dandamudi <Priyanka.dandamudi@intel.com>
Can you check the build once before it looks like some failure is there.
--Priyanka
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xe_exec_compute_mode: Add malloc-ufence test
2024-02-27 2:39 [PATCH] xe_exec_compute_mode: Add malloc-ufence test Matthew Brost
` (2 preceding siblings ...)
2024-03-05 4:50 ` [PATCH] " Dandamudi, Priyanka
@ 2024-03-05 14:31 ` Kamil Konieczny
3 siblings, 0 replies; 5+ messages in thread
From: Kamil Konieczny @ 2024-03-05 14:31 UTC (permalink / raw)
To: igt-dev; +Cc: Matthew Brost, Priyanka Dandamudi
Hi Matthew,
On 2024-02-26 at 18:39:56 -0800, Matthew Brost wrote:
> The get user page ufence path is not triggered by the test as ufence
> memory is a mapped BO. To trigger this path use a malloc'd address.
>
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> ---
> tests/intel/xe_exec_compute_mode.c | 28 ++++++++++++++++++++--------
> 1 file changed, 20 insertions(+), 8 deletions(-)
>
> diff --git a/tests/intel/xe_exec_compute_mode.c b/tests/intel/xe_exec_compute_mode.c
> index 7dad715093..c0cddbc02b 100644
> --- a/tests/intel/xe_exec_compute_mode.c
> +++ b/tests/intel/xe_exec_compute_mode.c
> @@ -31,6 +31,7 @@
> #define BIND_EXECQUEUE (0x1 << 4)
> #define VM_FOR_BO (0x1 << 5)
> #define EXEC_QUEUE_EARLY (0x1 << 6)
> +#define MALLOC_USER_FENCE (0x1 <<7)
------------------------------------------ ^
Put space before 7:
#define MALLOC_USER_FENCE (0x1 << 7)
>
> /**
> * SUBTEST: twice-%s
> @@ -48,6 +49,7 @@
> * arg[1]:
> *
> * @basic: basic
> + * @malloc-ufence: malloc user fence
You need this also for many-execqueues subtest below.
Regards,
Kamil
> * @preempt-fence-early: preempt fence early
> * @userptr: userptr
> * @rebind: rebind
> @@ -110,6 +112,7 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
> uint64_t exec_sync;
> uint32_t data;
> } *data;
> + uint64_t *vm_sync;
> int i, j, b;
> int map_fd = -1;
> int64_t fence_timeout;
> @@ -149,6 +152,12 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
> }
> memset(data, 0, bo_size);
>
> + if (flags & MALLOC_USER_FENCE)
> + vm_sync = malloc(sizeof(*vm_sync));
> + else
> + vm_sync = &data[0].vm_sync;
> + igt_assert(vm_sync);
> +
> for (i = 0; !(flags & EXEC_QUEUE_EARLY) && i < n_exec_queues; i++) {
> exec_queues[i] = xe_exec_queue_create(fd, vm, eci, 0);
> if (flags & BIND_EXECQUEUE)
> @@ -158,7 +167,7 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
> bind_exec_queues[i] = 0;
> };
>
> - sync[0].addr = to_user_pointer(&data[0].vm_sync);
> + sync[0].addr = to_user_pointer(vm_sync);
> if (bo)
> xe_vm_bind_async(fd, vm, bind_exec_queues[0], bo, 0, addr,
> bo_size, sync, 1);
> @@ -171,9 +180,9 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
>
> fence_timeout = igt_run_in_simulation() ? HUNDRED_SEC : ONE_SEC;
>
> - xe_wait_ufence(fd, &data[0].vm_sync, USER_FENCE_VALUE,
> + xe_wait_ufence(fd, vm_sync, USER_FENCE_VALUE,
> bind_exec_queues[0], fence_timeout);
> - data[0].vm_sync = 0;
> + *vm_sync = 0;
>
> for (i = 0; i < n_execs; i++) {
> uint64_t batch_offset = (char *)&data[i].batch - (char *)data;
> @@ -202,7 +211,7 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
> xe_vm_unbind_async(fd, vm, bind_exec_queues[e], 0,
> addr, bo_size, NULL, 0);
>
> - sync[0].addr = to_user_pointer(&data[0].vm_sync);
> + sync[0].addr = to_user_pointer(vm_sync);
> addr += bo_size;
> if (bo)
> xe_vm_bind_async(fd, vm, bind_exec_queues[e], bo,
> @@ -213,9 +222,9 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
> to_user_pointer(data),
> addr, bo_size, sync,
> 1);
> - xe_wait_ufence(fd, &data[0].vm_sync, USER_FENCE_VALUE,
> + xe_wait_ufence(fd, vm_sync, USER_FENCE_VALUE,
> bind_exec_queues[e], fence_timeout);
> - data[0].vm_sync = 0;
> + *vm_sync = 0;
> }
>
> if (flags & INVALIDATE && i + 1 != n_execs) {
> @@ -264,10 +273,10 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
> if (flags & INVALIDATE)
> usleep(250000);
>
> - sync[0].addr = to_user_pointer(&data[0].vm_sync);
> + sync[0].addr = to_user_pointer(vm_sync);
> xe_vm_unbind_async(fd, vm, bind_exec_queues[0], 0, addr, bo_size,
> sync, 1);
> - xe_wait_ufence(fd, &data[0].vm_sync, USER_FENCE_VALUE,
> + xe_wait_ufence(fd, vm_sync, USER_FENCE_VALUE,
> bind_exec_queues[0], fence_timeout);
>
> for (i = j; i < n_execs; i++)
> @@ -288,6 +297,8 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,
> xe_vm_destroy(fd, vm);
> if (map_fd != -1)
> close(map_fd);
> + if (flags & MALLOC_USER_FENCE)
> + free(vm_sync);
> }
>
> /**
> @@ -408,6 +419,7 @@ igt_main
> unsigned int flags;
> } sections[] = {
> { "basic", 0 },
> + { "malloc-ufence", MALLOC_USER_FENCE },
> { "preempt-fence-early", VM_FOR_BO | EXEC_QUEUE_EARLY },
> { "userptr", USERPTR },
> { "rebind", REBIND },
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-05 14:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-27 2:39 [PATCH] xe_exec_compute_mode: Add malloc-ufence test Matthew Brost
2024-02-27 2:54 ` ✗ Fi.CI.BUILD: failure for " Patchwork
2024-02-27 3:00 ` ✗ GitLab.Pipeline: warning " Patchwork
2024-03-05 4:50 ` [PATCH] " Dandamudi, Priyanka
2024-03-05 14:31 ` Kamil Konieczny
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.