<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GEN9] 20% perf drop in windowed/composited GpuTest Triangle"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=108598#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [GEN9] 20% perf drop in windowed/composited GpuTest Triangle"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=108598">bug 108598</a>
              from <span class="vcard"><a class="email" href="mailto:chris@chris-wilson.co.uk" title="Chris Wilson <chris@chris-wilson.co.uk>"> <span class="fn">Chris Wilson</span></a>
</span></b>
        <pre>(In reply to Chris Wilson from <a href="show_bug.cgi?id=108598#c9">comment #9</a>)
<span class="quote">> Had a stable 2% drop on bxt. The effect was due to reordering the requests
> to make i915_spin_request() more likely to be taken. The cost was not from
> reordering the requests themselves, but the act of busywaiting.

> i.e.

> diff --git a/drivers/gpu/drm/i915/i915_request.c
> b/drivers/gpu/drm/i915/i915_request.c
> index abd4dacbab8e..f5d4659a4aa0 100644
> --- a/drivers/gpu/drm/i915/i915_request.c
> +++ b/drivers/gpu/drm/i915/i915_request.c
> @@ -1230,6 +1230,11 @@ long i915_request_wait(struct i915_request *rq,
>         if (!timeout)
>                 return -ETIME;
>  
> +       /* Optimistic short spin before touching IRQs */
> +       wait.seqno = i915_request_global_seqno(rq);
> +       if (wait.seqno && __i915_spin_request(rq, wait.seqno, state, 5))
> +               return timeout;
> +
>         trace_i915_request_wait_begin(rq, flags);
>  
>         add_wait_queue(&rq->execute, &exec);
> @@ -1266,10 +1271,6 @@ long i915_request_wait(struct i915_request *rq,
>         GEM_BUG_ON(!intel_wait_has_seqno(&wait));
>         GEM_BUG_ON(!i915_sw_fence_signaled(&rq->submit));
>  
> -       /* Optimistic short spin before touching IRQs */
> -       if (__i915_spin_request(rq, wait.seqno, state, 5))
> -               goto complete;
> -</span >

Fwiw, this made it into

commit 52c0fdb25c7c919334b97976d05096b441a3eada
Author: Chris Wilson <<a href="mailto:chris@chris-wilson.co.uk">chris@chris-wilson.co.uk</a>>
Date:   Tue Jan 29 20:52:29 2019 +0000

    drm/i915: Replace global breadcrumbs with per-context interrupt tracking

So that should be my small reproducer fixed, but the larger drop is still a
mystery.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>