Re: [PATCH 10/40] drm/i915/selftests: Basic stress test for rapid context switching

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Mika Kuoppala (2018-09-20 11:38:08)
> Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes:
> > +             end_time = jiffies + i915_selftest.timeout_jiffies;
> > +             for_each_prime_number_from(prime, 2, 8192) {
> > +                     times[1] = ktime_get_raw();
> > +
> > +                     for (n = 0; n < prime; n++) {
> > +                             rq = i915_request_alloc(engine, ctx[n % nctx]);
> > +                             if (IS_ERR(rq)) {
> > +                                     err = PTR_ERR(rq);
> > +                                     goto out_unlock;
> > +                             }
> > +
> > +                             /*
> > +                              * This space is left intentionally blank.
> > +                              *
> > +                              * We do not actually want to perform any
> > +                              * action with this request, we just want
> > +                              * to measure the latency in allocation
> > +                              * and submission of our breadcrumbs -
> > +                              * ensuring that the bare request is sufficient
> > +                              * for the system to work (i.e. proper HEAD
> > +                              * tracking of the rings, interrupt handling,
> > +                              * etc). It also gives us the lowest bounds
> > +                              * for latency.
> > +                              */
> > +
> > +                             i915_request_add(rq);
> 
> We get the breadcrumbs in place, with the wa_tails and so on so this
> should work without any nops nor bb ends.

Right, not one batch.
 
> > +                     }
> > +                     i915_request_wait(rq,
> > +                                       I915_WAIT_LOCKED,
> > +                                       MAX_SCHEDULE_TIMEOUT);

Fwiw, a lesson learnt from buggy code is never to use
MAX_SCHEDULE_TIMEOUT in tests :)
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux