Re: [PATCH i-g-t] tests/i915/gem_exec_params: check available memory earlier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 01 Mar 2022 03:03:59 -0800, Matthew Auld wrote:
>
> 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").

I believe we tried this identical patch some time but don't remember why it
was never merged. Maybe it was not helping or more likely we weren't sure
it wouldn't break the test somehow (considering all the shmfs/swap
stuff). But if we think it's ok to merge this and may actually resolve the
-ENOMEM issue, this is:

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@xxxxxxxxx>



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux