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@xxxxxxxxxxxxxxxxxx> <SNIP> > +static int live_nop_request(void *arg) > +{ <SNIP> > + for_each_prime_number_from(prime, 1, 8192) { #define MAGIC_PRIME_2 8192 > + times[1] = ktime_get_raw(); > + > + for (n = 0; n < prime; n++) { > + request = i915_gem_request_alloc(engine, > + i915->kernel_context); > + if (IS_ERR(request)) { > + err = PTR_ERR(request); > + goto out_unlock; > + } Emitting even a single MI_NOOP or making a comment that the request will contain instructions even if we do nothing here, might help a newcomer. > + > + 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? Reviewed-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> Regards, Joonas -- Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx