Age | Commit message (Collapse) | Author |
|
Tests which call intel_require_memory currently always skip on simulation,
unless they fail first due insufficient memory. This can create different
outcomes depending on the simulation environment so move the simulation
skip to the start of the function for 100% consistency in results.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This reverts commit 2c7224e488457afb7bb76664c4b7c857baef1e08 as it was
accidentally pushed when fixing up the pm_rpm compilation. Oops.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Petri Latvala <petri.latvala@intel.com>
|
|
Halve our estimated available RAM for use by the tests to avoid nasty
situations where the test runner may force us into swap.
Rumour has it that the new runner isn't quite so bloated as piglit...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
|
|
sysinfo() doesn't include all reclaimable memory. In particular it
excludes the majority of global_node_page_state(NR_FILE_PAGES),
reclaimable pages that are a copy of on-disk files It seems the only way
to obtain this counter is by parsing /proc/meminfo. For comparison,
check vm_enough_memory() which includes NR_FILE_PAGES as available
(sadly there's no way to call vm_enough_memory() directly either!)
v2: Pay attention to what one writes.
v3: Trim off redundant space, and warn if the requested tags do not
match the layout of /proc/meminfo.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
|
|
Add any buffers reported by sysinfo to the estimate of available memory.
We do ask the kernel to purge it's caches before reporting sysinfo, but
a few remain that may be forced out by our test usage, so include them.
However, be conservative and only allow them to be swapped out.
References: https://bugs.freedesktop.org/show_bug.cgi?id=105967
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
|
|
If at first we don't succeed, try, try again.
References: https://bugs.freedesktop.org/show_bug.cgi?id=105967
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
|
|
At present, we never see the debug output of intel_require_memory() as
the debug log is not automaticaly dumped on requirement fail (only on
error). Promote the igt_debug showing the meminfo/slabinfo to igt_warn
so that they are visible on stderr without any trickery or --debug.
References: e5829165c2ef ("lib: Dump meminfo and slabinfo if we complain about insufficient memory")
References: https://bugs.freedesktop.org/show_bug.cgi?id=105967
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
We already have the routine we need in drv_suspend. Let's move it to lib
and use it in the mlocking tests. We can also make it a bit faster if we
tweak the initial step and initial amount.
(I think it's safe to assume that we should be able to lock 3/4
of RAM, this cuts the probe time on my 32G SKL - from ~530s to ~180s)
v2: Use available mem, amend step, also lock outside of fork,
early exit if the assumption is wrong (Chris)
Update the function name in doc (Ewelina)
v3: Total for pin, available for initial lock (Chris)
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ewelina Musial <ewelina.musial@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ewelina Musial <ewelina.musial@intel.com>
|
|
All too frequently, we fail our memory checks to a leak in the driver.
While we give every opportunity for the driver to release the memory
before we fail, if we do dump the meminfo and slabinfo, if available, so
we can assign blame^W^W resolve the problem quickly.
References: https://bugs.freedesktop.org/show_bug.cgi?id=105967
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Martin Peres <martin.peres@linux.intel.com>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Reviewed-by: Antonio Argenziano <antonio.argenziano@intel.com>
|
|
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96620
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
|
|
Release the internal caches (by flushing the idle_worker) to maximise the
available memory for use by tests (and to reduce sporadic skipping when
on the cusp).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
|
|
We have it. Daniel Stone said the #ifdef HAVE_CONFIG_H comes from the
X11 transition to the modular build, where in the imake -> modular
build transition config.h wasn't universally available. Now we just
make this a requirement (so yeah Android better generate one too).
v2: Improve commit message a bit.
Reviewed-by: Eric Anholt <eric@anholt.net>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Acked-by: Petri Latvala <petri.latvala@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Acked-by: Radoslaw Szwichtenberg <radoslaw.szwichtenberg@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This reverts commit 25fbae15262cf570e207e62f50e7c5233e06bc67, restoring
commit 301ad44cdf1b868b1ab89096721da91fa8541fdc
Author: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Thu Mar 2 10:37:11 2017 +0100
lib: Open debugfs files for the given DRM device
with fixes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
This reverts commit 301ad44cdf1b868b1ab89096721da91fa8541fdc.
When a render-only device is opened and gem_quiescent_gpu is called, we
need to use the debugfs dir for the master device instead.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
|
|
When opening a DRM debugfs file, locate the right path based on the
given DRM device FD.
This is needed so, in setups with more than one DRM device, any
operations on debugfs files affect the expected DRM device.
v2: - rebased and fixed new API additions
v3: - updated chamelium test, which was missed previously
- use the minor of the device for the debugfs path, not the major
- have a proper exit handler for calling igt_hpd_storm_reset with the
right device fd.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
The drop_caches sysctl has a max value of 4, so writing 7 to it just
fails. Avoid the earlier two-writes problem by opening the fd twice.
v2: Don't lseek(), open() twice. (Chris)
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
|
|
As the second write is ignored (leading to lack of memory freeing and
spuriously failing tests), just do everything from the one write.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Only fail the dmabuf tests if we cannot prep the system to support
"unlimited" fd.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
In order to keep the dmabuf mmap around whilst we keep the object alive,
we need a file descriptor for each. Check that the VFS supports that
many fd.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Now that we started packaging all parameters in one handy struct, pass
them everywhere. This allows us to pass along requirements so that we
can perform the checks inside each indvidual subtest and so not anger
the igt gods.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If we want to create more file handles than VFS supports (itself often a
memory limited value), report that we can not create that many objects
via intel_require_memory().
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Since we need a lot of memory, trim off the less significant digits for
easier human consumption.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
gem_concurrent_blit tries to ensure that it doesn't try and run a test
that would grind the system to a halt, i.e. unexpectedly cause swap
thrashing. It currently calls intel_require_memory(), but outside of
the subtest (as the tests use fork, it cannot do requirement testing
within the test children) - but intel_require_memory() calls
igt_require() and triggers and abort. Wrapping that initial require
within an igt_fixture() stops the abort(), but also prevents any further
testing.
This patch restructures the requirement checking to ordinary conditions,
which though allowing the test to run, also prevents listing of subtests
on machines which cannot handle them.
|
|
Allow the caller to ask how many extra large objects can be created and
still fit into memory.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Add rules to fix unused-result warnings when compiling with
_FORTIFY_SOURCE defined and apply them to the library and tests.
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Check for the sysconf value used here, not the one used in the
previous function.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This has the upside that we'll never forget to add it to thrashing
tests. But we'll also never miss to move it when adding basic
functionality tests to existing binaries. Chris already started this
refining work in e.g.
commit d77eda6614a1955717f224be023dedf74eb7735d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Nov 14 07:45:40 2014 +0000
igt/gem_linear_blits: Require that we do the full test
by moving igt_skip_on_simulation into subtests.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
More in line with the usual igt pattern and simplifies the code -
every called just wrapped it in igt_require.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Various stuff all over. Most done with the igt.cocci spatch, but
with a few fixups by hand. And add igt_core.h includes where needed.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Apparently it doesn't have much effect without the newline.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
Reset the system to a vanilla state before we query how much RAM/swap
space is available for our testing.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
If there is not enough free RAM+swap for us to execute our test, we will
hit OOM, so check first.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
|
|
I'm not really happy with the name of the igt_env_set function, I'll
follow up with a patch to change it.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
And shovel all the various helpers in there.
Also move igt_set_vt_graphics_mode to igt_kms.h since the function is
implemented in igt_kms.c. And it fits better. I kinda missed this in
the prep work.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
With the header cleanup we can now give this header a suitable name,
since it now really only contains register access and other I/O
functions and assorted definitions.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Only include what the header itself needs. The big fish here is
intel-gpu-tools.h. More will follow.
One ugly thing removed here is the duplicated GEN6_TD_CTL #define, one
of which was broken.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Right now almost everything in there concerns itself with register
access. Move everything else out (into drmtest.h for lack of better
place) to prepare for api documentation.
Also rename intel_drm.c to intel_os.c since it contains OS, not
drm abstractions.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|