[haiku-commits] Re: r34635 - in haiku/trunk: headers/private/kernel src/system/kernel src/system/kernel/scheduler

  • From: Rene Gollent <anevilyak@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 11 Dec 2009 13:22:48 -0600

On Fri, Dec 11, 2009 at 1:06 PM,  <ingo_weinhold@xxxxxx> wrote:
>  These changes help reducing latencies. On my machine in an idle system
>  playing music DebugAnalyzer shows maximum latencies of about 1 us. I still
>  find that a bit much, but it's several orders of magnitude better than
>  before. The -j8 Haiku image build time dropped about 10%.

If that's the case then I'm somewhat puzzled by you seeing such
horrible latencies with the affine scheduler, as it employs a nearly
identical strategy for issuing a reschedule on enqueueing a thread.
The only real difference is that it will re-enqueue a thread on
whatever CPU it was previously running on and base the reschedule
decision on the priority of the running thread on that core only. In
theory though an idle CPU with that scheduler will try to look for
work in another CPU's queue if it can't find anything in its own, I
wonder if you're perhaps seeing some form of ping-pong effect where
the cores are stealing threads from each other repeatedly. I haven't
seen such behavior myself but I don't have 8 cores.

On another note, I now need to make some cleanups in affine since your
addition to the cpu_ent structure makes some of the affine scheduler's
bookkeeping redundant (it was already tracking the running thread on
each CPU in its own structure).

Regards,

Rene

Other related posts: