<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - RT cpu starvation due to driver threads or memory access"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=110950#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - RT cpu starvation due to driver threads or memory access"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=110950">bug 110950</a>
              from <span class="vcard"><a class="email" href="mailto:sancelot@numalliance.com" title="ANCELOT Stéphane <sancelot@numalliance.com>"> <span class="fn">ANCELOT Stéphane</span></a>
</span></b>
        <pre>(In reply to Chris Wilson from <a href="show_bug.cgi?id=110950#c1">comment #1</a>)
<span class="quote">> I don't suppose you have a handy recipe for setting up a machine with an
> isolated RT CPU?
> </span >

If I understand correctly the question, the system is started with cpus 0
isolated thanks to isolcpus=1 kernel boot parameters.

When RT threads are started, they are migrated to cpus 0 using
pthread_setaffinity_np()



<span class="quote">> <a href="https://gitlab.freedesktop.org/drm/igt-gpu-tools/blob/master/benchmarks/">https://gitlab.freedesktop.org/drm/igt-gpu-tools/blob/master/benchmarks/</a>
> gem_syslatency.c

> is a tool we use to try and assess the damage we cause to the system by
> measuring the latency of an RT thread. But I've never before setup an
> isolated cpu...</span >
>
The problem can better being watched, if 2 RT tasks are used, first one starts
periodically at eg 3ms and lasts eg 300us, the next one is chained by the first
one and lasts eg 100us. adding 50us for each context change, you unfortunately
finish the last task at almost 1.3 ms when problem has occured. 


I can monitor tasks activation using serial com port and a scope meter.
Monitoring times thanks to clock_gettime  in threads is accurate too.

<span class="quote">> Just to check, do you mean the cpu isolation feature in the kernel, or are
> just using cpuset?

> And also to confirm you are talking about CPU preemption and not GPU
> preeemption?</span >

If I understand , that is CPU preemption , the realtime task does not access
GPU. however graphic tasks (non RT tasks) are loading GPU unit.</pre>
        </div>
      </p>


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

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