From owner-freebsd-current@FreeBSD.ORG Fri Sep 10 13:31:35 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08C8716A4CE; Fri, 10 Sep 2004 13:31:35 +0000 (GMT) Received: from server1.astraldream.net (astraldream.net [69.20.5.160]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84DBC43D1F; Fri, 10 Sep 2004 13:31:34 +0000 (GMT) (envelope-from ssouhlal@FreeBSD.org) Received: from [198.82.175.68] (hc652af44.dhcp.vt.edu [198.82.175.68]) (authenticated (0 bits)) by server1.astraldream.net (8.11.6/8.11.6) with ESMTP id i8ADVSX21370 (using TLSv1/SSLv3 with cipher RC4-SHA (128 bits) verified NO); Fri, 10 Sep 2004 09:31:29 -0400 In-Reply-To: <24D02CEA-022C-11D9-870B-000A95C4D7BC@FreeBSD.org> References: <20040905124526.F15143@midi.ihme.net> <24D02CEA-022C-11D9-870B-000A95C4D7BC@FreeBSD.org> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Suleiman Souhlal Date: Fri, 10 Sep 2004 09:31:23 -0400 To: Suleiman Souhlal X-Mailer: Apple Mail (2.619) cc: freebsd-current@FreeBSD.org cc: =?ISO-8859-1?Q?Markus_H=E4stbacka?= Subject: Re: Sound performance problems in FreeBSD X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Sep 2004 13:31:35 -0000 Hi, > FYI, after a few IRC discussions with Markus, we've discovered that > turning off the memory part of Gnome's System Monitor applet, would > get rid of the skips. I believe the problem is that both sysctl and > the sound drivers are Giant-locked, and so there is some contention. > An easy way to reproduce these > skips is to run `while true; do sysctl vm.vmtotal; done`, while > playing an mp3. In case you are interested, we've confirmed that Giant contention is the problem: Applying the hack at http://people.freebsd.org/~ssouhlal/giantless-sysctl.diff , which removes Giant from sysctl, seems to stop the skips when running the above command. Of course, it doesn't prevent skips from happening during heavy file operation, which would probably require VFS locking (or of course, locking the sound drivers, which is probably easier), and maybe, a better disk scheduler. -- Suleiman Souhlal | ssouhlal@vt.edu The FreeBSD Project | ssouhlal@FreeBSD.org