From owner-freebsd-current Wed Feb 21 20:52:38 2001 Delivered-To: freebsd-current@freebsd.org Received: from rina.r.dl.itc.u-tokyo.ac.jp (cvsup2.r.dl.itc.u-tokyo.ac.jp [133.11.199.247]) by hub.freebsd.org (Postfix) with ESMTP id 5691B37B491; Wed, 21 Feb 2001 20:52:35 -0800 (PST) (envelope-from tanimura@r.dl.itc.u-tokyo.ac.jp) Received: from rina.r.dl.itc.u-tokyo.ac.jp (localhost [127.0.0.1]) by rina.r.dl.itc.u-tokyo.ac.jp (8.11.1+3.4W/3.7W-rina.r-0.1-11.01.2000) with ESMTP id f1M4qSg63873; Thu, 22 Feb 2001 13:52:29 +0900 (JST) Date: Thu, 22 Feb 2001 13:52:28 +0900 Message-ID: From: Seigo Tanimura To: "Cameron Grant" , John Baldwin Subject: MP-safe midi(4) and sequencer callout priority Cc: Seigo Tanimura , current@FreeBSD.org User-Agent: Wanderlust/1.1.1 (Purple Rain) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386--freebsd) Organization: Digital Library Research Division, Information Techinology Centre, The University of Tokyo MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The patch at http://people.FreeBSD.org/~tanimura/patches/midimutex.diff.gz makes midi(4) MP-safe. With this patch, my kernel with WITNESS and INVARIANTS plays my favorite midi tunes just fine, except that the callout used by the midi sequencer gets delayed under a heavy load. As the sequencer uses callout in order to wait until the next midi message is ready to be transmitted, the callout should run at PI_AV so that a tune will not sound messy. John, have you got any plan to modify the priority of a callout? Cameron, as pcm(4) interacts with few of the other subsystems in the kernel like midi(4), why don't you start making pcm(4) MP-safe? Multimedia devices should benefit very much from kernel execution in parallel. The only one thing to note is to not access a device in parallel to mess it up. We have to add a mutex to a device and share the mutex between the pcm part and the midi part of the driver. Could you please let me know when pcm(4) gets MP-safe, and we will see how we can share device mutexes between pcm(4) and midi(4). -- Seigo Tanimura To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message