[PATCH] tests/xe: Add system_allocator test

Thomas Hellström thomas.hellstrom at linux.intel.com
Wed Apr 16 17:09:40 UTC 2025


Hi, Matt,

On Tue, 2025-04-15 at 19:20 -0700, Matthew Brost wrote:
> Test various uses of system allocator in single thread, multiple
> threads, and multiple processes.
> 
> Features tested:
>  - Malloc with various size
>  - Mmap with various sizes and flags including file backed mappings
>  - Mixing BO allocations with system allocator
>  - Various page sizes
>  - Dynamically freeing / unmapping memory
>  - Sharing VM across threads
>  - Faults racing on different hardware engines / GTs / Tiles
>  - GPU faults and CPU faults racing
>  - CPU faults on multiple threads racing
>  - CPU faults on multiple process racing
>  - GPU faults of memory not faulted in by CPU
>  - Partial unmap of allocations
>  - Attempting to unmap system allocations when GPU has mappings
>  - Eviction of both system allocations and BOs
>  - Forking child processes and reading data from VRAM
>  - mremap data in VRAM
>  - Protection changes
>  - Multiple faults per execbuf
> 
> Running on LNL, BMG, PVC 1 tile, and PVC 2 tile.
> 
> v2:
>  - Rebase
>  - Fix memory allocation to not interfear with malloc (Thomas)
> 
> Signed-off-by: Matthew Brost <matthew.brost at intel.com>

Did you have a chance to look at the memory (or rather virtual
adddress) leaks on the tests as well?  
With the old version it would exceed 1GB after some time, which I
believe caused some slowdown.

Unfortunately the igt library funcs also leaks memory so running the
test under valgrind was a bit noisy, but helped to some extent.

/Thomas



More information about the igt-dev mailing list