From owner-freebsd-current@FreeBSD.ORG Wed Jun 8 03:32:13 2005 Return-Path: X-Original-To: current@freebsd.org 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 B8A2016A41C for ; Wed, 8 Jun 2005 03:32:13 +0000 (GMT) (envelope-from jroberson@chesapeake.net) Received: from mail.chesapeake.net (chesapeake.net [208.142.252.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CDFB43D1F for ; Wed, 8 Jun 2005 03:32:13 +0000 (GMT) (envelope-from jroberson@chesapeake.net) Received: from mail.chesapeake.net (localhost [127.0.0.1]) by mail.chesapeake.net (8.12.10/8.12.10) with ESMTP id j583WCk9050694 for ; Tue, 7 Jun 2005 23:32:12 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.12.10/8.12.10/Submit) with ESMTP id j583WCpl050690 for ; Tue, 7 Jun 2005 23:32:12 -0400 (EDT) (envelope-from jroberson@chesapeake.net) X-Authentication-Warning: mail.chesapeake.net: jroberson owned process doing -bs Date: Tue, 7 Jun 2005 23:32:12 -0400 (EDT) From: Jeff Roberson To: current@freebsd.org Message-ID: <20050607210453.S16943@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Subject: Sound skipping problems X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 08 Jun 2005 03:32:13 -0000 I have a patch that should greatly improve the sound skipping problems people have under heavy io load. Several people sent me traces that showed the buf daemon running for hundreds of milliseconds with Giant held, which can hold up the pcm code. The patch is available at: http://www.chesapeake.net/~jroberson/flushbuf.diff This changes flushbufqueues to flush multiple buffers instead of one buffer at a time. It also places buffers we failed to flush at the end of the list, and uses a sentinal to track our progress through the list. This almost entirely solved the skipping problem for me. Depending on user feedback we can do a little more to reduce the time spent processing here. Cheers, Jeff