Skip to contentSkip to conversation

tests/gem_userptr_blits: Expanded userptr test cases

PATCH New Tvrtko Ursulin 1 participant 3 messages Apr 25, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 tests/gem_userptr_blits: Expanded userptr test cases

From: Tvrtko Ursulin <[email protected]>

A set of userptr test cases to support the new feature.

For the eviction and swapping stress testing I have extracted some common behaviour from gem_evict_everything and made both test cases use it to avoid duplicating the code.

Both unsynchronized and synchronized userptr objects are tested but the latter set of tests will be skipped if kernel is compiled without MMU_NOTIFIERS.

Also, with 32-bit userspace swapping tests are skipped if the system has a lot more RAM than process address space. Forking swapping tests are not skipped since they can still trigger swapping by cumulative effect.

v2:
* Fixed dmabuf test.
* Added test for rejecting read-only.
* Fixed ioctl detection for latest kernel patch.

v3:
* Use ALIGN macro.
* Catchup with big lib/ reorganization.
* Fixed up some warnings.

---
 tests/.gitignore          |    1 +
 tests/Makefile.sources    |    1 +
 tests/gem_userptr_blits.c | 1247 +++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 1249 insertions(+)
 create mode 100644 tests/gem_userptr_blits.c
tests/.gitignore +1 -0
index f710c9b..34106cb 100644
@@ -98,6 +98,7 @@ gem_tiling_max_stride
 gem_unfence_active_buffers
 gem_unref_active_buffers
 gem_vmap_blits
+gem_userptr_blits
 gem_wait_render_timeout
 gem_write_read_ring_switch
 gen3_mixed_blits
tests/Makefile.sources +1 -0
index 44b99e6..febe17f 100644
@@ -124,6 +124,7 @@ TESTS_progs = \
 	gem_unfence_active_buffers \
 	gem_unref_active_buffers \
 	gem_vmap_blits \
+	gem_userptr_blits \
 	gem_wait_render_timeout \
 	gen3_mixed_blits \
 	gen3_render_linear_blits \
tests/gem_userptr_blits.c new file +1247 -0

1,247 lines not on this page · raw message

Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 2/3 tests/gem_vmap_blits: Remove obsolete test case

From: Tvrtko Ursulin <[email protected]>

No need for the old test case once the new one was added.

v2:
* Just rebase for lib/ reorganization.

---
 tests/.gitignore       |   1 -
 tests/Makefile.sources |   1 -
 tests/gem_vmap_blits.c | 345 -------------------------------------------------
 3 files changed, 347 deletions(-)
 delete mode 100644 tests/gem_vmap_blits.c
tests/.gitignore +0 -1
index 34106cb..fedddbf 100644
@@ -97,7 +97,6 @@ gem_tiled_swapping
 gem_tiling_max_stride
 gem_unfence_active_buffers
 gem_unref_active_buffers
-gem_vmap_blits
 gem_userptr_blits
 gem_wait_render_timeout
 gem_write_read_ring_switch
tests/Makefile.sources +0 -1
index febe17f..a8a091d 100644
@@ -123,7 +123,6 @@ TESTS_progs = \
 	gem_tiling_max_stride \
 	gem_unfence_active_buffers \
 	gem_unref_active_buffers \
-	gem_vmap_blits \
 	gem_userptr_blits \
 	gem_wait_render_timeout \
 	gen3_mixed_blits \
tests/gem_vmap_blits.c deleted +0 -345

345 lines not on this page · raw message

Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

PATCH 3/3 tests/gem_userptr_benchmark: Benchmarking userptr surfaces and impact

In reply to Tvrtko Ursulin

From: Tvrtko Ursulin <[email protected]>

This adds a small benchmark for the new userptr functionality.

Apart from basic surface creation and destruction, also tested is the impact of having userptr surfaces in the process address space. Reason for that is the impact of MMU notifiers on common address space operations like munmap() which is per process.

v2:
* Moved to benchmarks.
* Added pointer read/write tests.
* Changed output to say iterations per second instead of operations per second.
* Multiply result by batch size for multi-create* tests for a more comparable number with create-destroy test.

v3:
* Use ALIGN macro.
* Catchup with big lib/ reorganization.
* Removed unused code and one global variable.
* Fixed up some warnings.

v4:
* Fixed feature test, does not matter here but makes it consistent with gem_userptr_blits and clearer.

---
 benchmarks/.gitignore              |   1 +
 benchmarks/Makefile.sources        |   3 +-
 benchmarks/gem_userptr_benchmark.c | 498 +++++++++++++++++++++++++++++++++++++
 3 files changed, 501 insertions(+), 1 deletion(-)
 create mode 100644 benchmarks/gem_userptr_benchmark.c
benchmarks/.gitignore +1 -0
index ddea6f7..09e5bd8 100644
@@ -1,3 +1,4 @@
+gem_userptr_benchmark
 intel_upload_blit_large
 intel_upload_blit_large_gtt
 intel_upload_blit_large_map
benchmarks/Makefile.sources +2 -1
index f9da579..60bdae2 100644
@@ -2,4 +2,5 @@ bin_PROGRAMS =                          \
 	intel_upload_blit_large         \
 	intel_upload_blit_large_gtt     \
 	intel_upload_blit_large_map     \
-	intel_upload_blit_small
+	intel_upload_blit_small		\
+	gem_userptr_benchmark
benchmarks/gem_userptr_benchmark.c new file +498 -0

498 lines not on this page · raw message

Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx