diff options
author | Matthew Auld <matthew.auld@intel.com> | 2022-03-01 11:03:59 +0000 |
---|---|---|
committer | Matthew Auld <matthew.auld@intel.com> | 2022-03-04 15:58:19 +0000 |
commit | 506a890aecb62382a114f43e30b35d96a03fd9ef (patch) | |
tree | 15a69955dd735e53d05a5de56315d31710cfcc8d /tools | |
parent | 698695136f8ade2391f2d8f45300eae2df02e947 (diff) |
tests/i915/gem_exec_params: check available memory earlier
The shmem mmap and pwrite interfaces conveniently let us probe just a
few pages, without needing to populate the entire object. On discrete
and newer platforms the kernel has dropped support for both, leaving us
with MMAP_OFFSET, which will always populate the entire object, for now
at least. Luckily we can just move the batch creation to after checking
the available memory to ensure we don't hit -ENOMEM on such platforms.
Also it seems that doing a massive allocation(filling much of system
memory) and then calling intel_purge_vm_caches() seems to take 40+
seconds, like when calling intel_require_memory(). Hence switching the
ordering here should also help with that.
For reference the larger-than-life test is just a simple regression test
to ensure that some very large batch buffer(greater than ~4G) can't
overflow the batch_len, causing all kinds of issues. See 57b2d834bf23
("drm/i915/gem: Support parsing of oversize batches").
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions