[Intel-gfx] [PATCH v2 14/38] drm/i915: Simple selftest to exercise live requests

Chris Wilson chris at chris-wilson.co.uk
Wed Feb 1 10:31:51 UTC 2017


On Wed, Feb 01, 2017 at 10:14:28AM +0200, Joonas Lahtinen wrote:
> On to, 2017-01-19 at 11:41 +0000, Chris Wilson wrote:
> > Just create several batches of requests and expect it to not fall over!
> > 
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> 
> <SNIP>
> 
> > +static int live_nop_request(void *arg)
> > +{
> 
> <SNIP>
> 
> > +		for_each_prime_number_from(prime, 1, 8192) {
> 
> #define MAGIC_PRIME_2 8192

I'm sorry, but that is worse than having a very clear arbitrary number.

> > +
> > +				i915_add_request(request);
> > +			}
> > +			i915_wait_request(request,
> > +					  I915_WAIT_LOCKED,
> > +					  MAX_SCHEDULE_TIMEOUT);
> > +
> > +			times[1] = ktime_sub(ktime_get_raw(), times[1]);
> > +			if (prime == 1)
> > +				times[0] = times[1];
> 
> Having this as an array is just hiding names and gaining nothing, how
> about calling them just time_first, time_last?

time_0, time_N? The array is because I did/am considering that the graph
may be interesting. There should be a plateau at the point the ring is
full - not world shattering, just mildly interesting. Still, probably
want the times for cold submit_1 vs warm submit_1.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list