[haiku-commits] Re: r34634 - haiku/trunk/src/system/kernel/scheduler

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 12 Dec 2009 16:43:34 +0100

On 2009-12-12 at 16:03:24 [+0100], Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> 
wrote:
> Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> > On 2009-12-11 at 18:40:15 [+0100], axeld@xxxxxxxxxxxxxxxx wrote:
> > > Author: axeld
> > > Date: 2009-12-11 18:40:15 +0100 (Fri, 11 Dec 2009)
> > > New Revision: 34634
> > > Changeset: http://dev.haiku-os.org/changeset/34634/haiku
> > > 
> > > Modified:
> > >    haiku/trunk/src/system/kernel/scheduler/scheduler_simple.cpp
> > > Log:
> > > * Changed the simple scheduler's next thread selection in the same
> > > way as
> > > the
> > >   affine scheduler to avoid possible latency issues.
> > Am I assuming correctly that simple_smp suffers from the same
> > problem? Are
> > you going to apply the change to it, too?
> 
> Just did it. I haven't updated to your latest changes, but with the
> early version of the simple SMP scheduler, sound skipping is a lot
> worse than it previously was with the affine scheduler.

Depending on which version you were using, that could be expected. Before 
r34635 enqueue_in_run_queue() did always return false, which could cause 
unnecessarily long latencies for high-priority threads in case of a 
time-caused wake-up (snooze() or timeout on locking primitive). At least on 
my machine the audio skips got a lot better after the change.

They still occur, though. Sometimes completely without any obvious cause, 
but often when saving or loading a file. In the one no-obvious-cause case 
when I managed to have the scheduling recorder running, I couldn't find 
anything obvious in the scheduling analysis, though. So it might just be an 
issue in the involved media nodes, like internal latencies not being 
computed generously enough or incorrect system vs. performance time 
computations.

CU, Ingo

Other related posts: