[Intel-gfx] [PATCH igt v2] lib: Update intel_require_memory to handle +4GB cases
Daniel Vetter
daniel at ffwll.ch
Thu Jun 25 00:46:07 PDT 2015
On Wed, Jun 24, 2015 at 04:38:55PM +0100, Chris Wilson wrote:
> On Wed, Jun 24, 2015 at 02:40:31PM +0100, Michel Thierry wrote:
> > Changed size from u32 to u64 to support +4GB.
> > 48-bit PPGTT test cases may need extra memory available.
> >
> > v2: Use thousands separator (Chris)
> >
> > Cc: Chris Wilson <chris at chris-wilson.co.uk>
> > Signed-off-by: Michel Thierry <michel.thierry at intel.com>
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
>
> One last thing, whilst you're in this function, mind moving the
> igt_skip_on_simulation() to the start?
>
> intel_require_memory()
> {
> /* We use intel_require_memory() to detect tests that are designed to
> * with large working sets to stress boundaries such as aperture, and/or
> * memory exhaustion. Functional tests that also require large working
> * sets are split into two, a small subtest to verify the operation with the
> * absolute minimum working set, and the full subtest to verify the
> * interesting corner cases. The former test doesn't require the
> * memory check and so judicious use of intel_require_memory() helps
> * segregate such functional tests from the broader tests, useful for
> * slow verification systems such as the simulator.
> *
> * To recap, lay out behaviour tests like:
> * igt_subtest("small") {
> * run_test({.num_surfaces = 2 });
> * }
> * igt_subtest("full") {
> * intel_require_memory(NUM_SURFACES, SURFACE_SIZE, CHECK_RAM);
> * run_test({.num_surfaces = NUM_SURFACES});
> * }
> * so that we have a simple check that is run anywhere and everywhere,
> * useful to prove the test itself works as expected, and the full
> * slow check that needs to be run on real hardware.
> */
This is an excellent usage hint, care to add it to the gtkdoc section? Not
sure whether the code quote needs any special treatment. But probably good
to insert a suitable # heading above it, so that this example usage
discussion stands out from the more general function description.
Thanks, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the Intel-gfx
mailing list