Subject: Re: Some change in -current makes asterisk stutter?
To: None <current-users@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: current-users
Date: 09/30/2007 23:22:22
In article <slrnffv33b.me9.mjl+usenet-2004-02@asparagus.emsi.priv.at>,
Martin J. Laubach <mjl@netbsd.org> wrote:
>  Does anyone know of a change in -current that would match the
>following symptom:
>
>  I upgraded kernel and userland to a recent snapshot yesterday
>and since, asterisk generates (ie. plays them over a SIP channel)
>stuttering sounds when executing certain actions.
>
>  It sounds as if it plays a full frame but only fills half of
>it, so the audio sounds choppy at a rate of about 1/5 sec. It
>sounds as if every other 1/10th second frame is replaced by
>silence. This does not happen under all circumstances, only
>when executing the PlayTones command or playing background music.
>The rest of the audio is, strangely enough, all right.
>
>  I recompiled asterisk but to no avail.
>
>  Does that ring a bell? Any change in an area that might have
>something to do with that?

Can you try this? Someone has similar problems.

christos

Index: kern_sleepq.c
===================================================================
RCS file: /cvsroot/src/sys/kern/kern_sleepq.c,v
retrieving revision 1.14
diff -u -r1.14 kern_sleepq.c
--- kern_sleepq.c	6 Sep 2007 23:59:01 -0000	1.14
+++ kern_sleepq.c	27 Sep 2007 14:16:23 -0000
@@ -163,6 +163,7 @@
 	if ((l->l_flag & LW_INMEM) != 0) {
 		sched_enqueue(l, false);
 		pri = lwp_eprio(l);
+#if 0
 		/* XXX This test is not good enough! */
 		if ((pri < spc->spc_curpriority && pri < PUSER) ||
 #ifdef MULTIPROCESSOR
@@ -172,6 +173,10 @@
 #endif
 			cpu_need_resched(ci, RESCHED_IMMED);
 		}
+#else
+		if (pri < spc->spc_curpriority)
+			cpu_need_resched(ci, RESCHED_IMMED);
+#endif
 		spc_unlock(ci);
 		return 0;
 	}