7 Commits

Author SHA1 Message Date
Daniel Vetter
76dfa9195a tests/gem_evict_everything: tune down forked subtests
On new machines with gobloads of memory and cpu cores, but slow swap
on spinning rust we need to limit the runtime a bit for sanity.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-30 16:04:38 +02:00
Daniel Vetter
225a91bc54 lib/drmtest: include sys/mman.h from drmtest.h
We need it for mmapping to get at PROT_READ|WRITE anyway.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-09-03 10:38:29 +02:00
Daniel Vetter
8f5d541620 tests/gem_evict_everything: add swapping and forked subtests
Much better at hitting the list corruption here on my machines
than what we have thus far.

Note that somehow I just can't reproduce the bug any more. No idea
why. But I guess it's time to simply push this pile out.

v2: Limit threads and rounds to something reasonable.

v3: Use igt_permute_array to avoid EINVAL due to duplicated bo.

v4:
- Add a variant of the forked tests with multiple drm fds.
- Tune the swapped forked tests a bit to complete in a reasonable
  amount of time.

v5: Add some memory pressure from the cpu by using cpu mmaps (which
directly hit shmem, so bypass gem completely).

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-29 21:44:28 +02:00
Daniel Vetter
5fe116e913 tests/gem_evict_*: Fix leak in copy
This turned out to be the reason one one of my tests was hitting
the list corruption bug - we need a good deal more memory pressure.
So I'll now add a new testcase for that.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-29 18:18:33 +02:00
Daniel Vetter
09d9089ead tests/gem_evict_*: Add interruptible modes
Also I've stumbled over igt_fixture again. Somehow gcc loves to wreak
havoc with stack variables set up in igt_fixtures ... Duct-tape in the
form of moving fd out to global scope applied.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2013-08-23 22:32:29 +02:00
Chris Wilson
398be7d573 gem_evict_everything: Fix the error code checking after drmIoctl
drmIoctl doesn't return the errno, so look it up after an error.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-20 12:40:56 +01:00
Chris Wilson
c615b58289 tests: Add gem_evict_everything
Exercise the eviction logic. This is just a naive test to ensure that we
can evict old buffers to accommodate new batches, and in the process
trigger the evict everything logic.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-08-20 11:53:44 +01:00