NetBSD Problem Report #52098

From dholland@macaran.eecs.harvard.edu  Tue Mar 21 07:42:55 2017
Return-Path: <dholland@macaran.eecs.harvard.edu>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 47A3A7A2B3
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 21 Mar 2017 07:42:55 +0000 (UTC)
Message-Id: <20170321074200.82A3E6E27D@macaran.eecs.harvard.edu>
Date: Tue, 21 Mar 2017 03:41:52 -0400 (EDT)
From: dholland@eecs.harvard.edu
Reply-To: dholland@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: audio replays buffers under load
X-Send-Pr-Version: 3.95

>Number:         52098
>Category:       kern
>Synopsis:       audio replays buffers under load
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    nat
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 21 07:45:00 +0000 2017
>Closed-Date:    Mon Aug 21 23:32:09 +0000 2017
>Last-Modified:  Mon Aug 21 23:32:09 +0000 2017
>Originator:     David A. Holland
>Release:        NetBSD 7.99.65 (20170309)
>Organization:
>Environment:
System: NetBSD macaran 7.99.65 NetBSD 7.99.65 (MACARAN) #41: Thu Mar 9 19:33:59 EST 2017 dholland@macaran:/usr/src/sys/arch/amd64/compile/MACARAN amd64
Architecture: x86_64
Machine: amd64
>Description:

With a kernel from March 9th (which I believe has most or all of the
main round of audio fixes) I'm getting skipping under load (it was
running ogg123 while compiling lang/coq) but the skipping comes in the
form of repeating a buffer rather than glitching or hiccuping. This is
not necessarily fatal but to me at least it's a lot more distracting
than a regular glitch.

also, a build that isn't actively swapping to death oughtn't skip.

audio hw is:

hdaudio0 at pci0 dev 27 function 0: HD Audio Controller
hdaudio0: interrupting at msi1 vec 0
hdafg1 at hdaudio0: vendor 10ec product 0662
hdafg1: DAC00 2ch: Speaker [Jack], HP Out [Jack]
hdafg1: DIG01 2ch: SPDIF Out [Jack]
hdafg1: ADC02 2ch: Line In [Jack], Mic In [Jack]
hdafg1: 2ch/2ch 44100Hz 48000Hz 96000Hz PCM16 PCM20 PCM24 AC3
audio0 at hdafg1: full duplex, playback, capture, mmap, independent
hdafg1: Virtual format configured - Format SLINEAR, precision 16, channels 2, frequency 48000

>How-To-Repeat:

>Fix:

maybe the mixer thread needs its priority jacked up?

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/52098: audio replays buffers under load
Date: Tue, 21 Mar 2017 08:54:40 +0100

 On Tue, Mar 21, 2017 at 07:45:00AM +0000, dholland@eecs.harvard.edu wrote:
 > With a kernel from March 9th (which I believe has most or all of the
 > main round of audio fixes) I'm getting skipping under load (it was
 > running ogg123 while compiling lang/coq) but the skipping comes in the
 > form of repeating a buffer rather than glitching or hiccuping.

 This is the same effect that is left for me from PR kern/51760.
 I see it more randomly, unrelated to load.

 I'll close the other PR, as the description is not really good for the
 current issues any more.

 Martin

Responsible-Changed-From-To: kern-bug-people->nat
Responsible-Changed-By: nat@NetBSD.org
Responsible-Changed-When: Wed, 12 Apr 2017 14:04:36 +0000
Responsible-Changed-Why:
Take.


From: "Nathanial Sloss" <nat@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52098 CVS commit: src/sys/dev
Date: Wed, 12 Apr 2017 14:21:12 +0000

 Module Name:	src
 Committed By:	nat
 Date:		Wed Apr 12 14:21:12 UTC 2017

 Modified Files:
 	src/sys/dev: audio.c

 Log Message:
 Increase the priority of the mixing thread to improve performace under
 load.

 This should address PR kern/52098.


 To generate a diff of this commit:
 cvs rdiff -u -r1.322 -r1.323 src/sys/dev/audio.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: nat@NetBSD.org
State-Changed-When: Fri, 14 Apr 2017 00:09:16 +0000
State-Changed-Why:
I've tested this extensively on my computer with all 4 cores maxed
out and some swap activity.  Play back remains smooth.


From: "Nathanial Sloss" <nat@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52098 CVS commit: src/sys/dev
Date: Fri, 14 Apr 2017 00:05:46 +0000

 Module Name:	src
 Committed By:	nat
 Date:		Fri Apr 14 00:05:46 UTC 2017

 Modified Files:
 	src/sys/dev: audio.c

 Log Message:
 Increase the priority of the mixing thread yet again.
 Ensure that there is data in the mix ring.

 Addresses PR kern/52098.


 To generate a diff of this commit:
 cvs rdiff -u -r1.323 -r1.324 src/sys/dev/audio.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 21 Aug 2017 23:32:09 +0000
State-Changed-Why:
Has been ok recently as far as I can recall


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.