NetBSD Problem Report #32588
From www@netbsd.org Sat Jan 21 17:33:47 2006
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
id EC93D63B90F; Sat, 21 Jan 2006 17:33:46 +0000 (UTC)
Message-Id: <20060121173346.EC93D63B90F@narn.netbsd.org>
Date: Sat, 21 Jan 2006 17:33:46 +0000 (UTC)
From: nbgnats@anastigmatix.net
Reply-To: nbgnats@anastigmatix.net
To: gnats-bugs@netbsd.org
Subject: umidi(4) transmit throughput
X-Send-Pr-Version: www-1.0
>Number: 32588
>Category: kern
>Synopsis: umidi(4) transmit throughput
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: chap
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 21 17:35:00 +0000 2006
>Closed-Date: Thu Sep 14 17:03:22 +0000 2006
>Last-Modified: Thu Sep 14 17:03:22 +0000 2006
>Originator: Chapman Flack
>Release: 2.0
>Organization:
>Environment:
NetBSD lundestad.anastigmatix.net 2.0 NetBSD 2.0 (lundestad) #112: Sat Jan 21 01:50:59 EST 2006 xxx@xxx:/usr/src/sys/arch/i386/compile/lundestad i386
>Description:
The use of 4-byte USB transfers in umidi(4) limits MIDI throughput
on USB1.1 to a scant 16% of the 1983 MIDI spec data rate. An earlier
patch (kern/32441) fixes that for receive; this patch is the fix for
transmit.
>How-To-Repeat:
Over a USB1.1 link to a USB-MIDI adapter (my configuration: ALi USB2
chipset with ehci disabled, and Midiman Midisport 2x4), blast some data
out an rmidi port (\376 is a valid single-byte MIDI message; a 3125-byte
block should transmit in one second):
$ </dev/zero tr '\0' '\376' | dd bs=3125 count=10 of=/dev/rmidi2
10+0 records in
10+0 records out
31250 bytes transferred in 62.544 secs (499 bytes/sec)
>Fix:
http://www.anastigmatix.net/cvsweb.cgi/NetBSD/umidixmt.pat
After this patch:
$ exec 3>/dev/rmidi2 4>/dev/rmidi3 5>/dev/rmidi4 6>/dev/rmidi5
$ for i in 3 4 5 6
> do </dev/zero tr '\0' '\376' | dd bs=3125 count=60 >&$i &
> done
[1] 430 1076
[2] 484 1208
[3] 794 1115
[4] 990 1046
$ 59+1 records in
59+1 records out
185399 bytes transferred in 59.183 secs (3132 bytes/sec)
60+0 records in
60+0 records out
187500 bytes transferred in 59.817 secs (3134 bytes/sec)
60+0 records in
60+0 records out
187500 bytes transferred in 59.824 secs (3134 bytes/sec)
60+0 records in
60+0 records out
187500 bytes transferred in 59.836 secs (3133 bytes/sec)
...sustained simultaneous transmission to all four ports at full MIDI
data rate.
This patch should be fuzz-free on 2.0 sources after application of the
kern/32441, 32442, and 32567 patches. There has been little cvs activity
on the affected files since 2.0, so applying to current sources should
be straightforward.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: kern-bug-people->chap
Responsible-Changed-By: chap@netbsd.org
Responsible-Changed-When: Thu, 14 Sep 2006 17:03:22 +0000
Responsible-Changed-Why:
Made the changes.
State-Changed-From-To: open->closed
State-Changed-By: chap@netbsd.org
State-Changed-When: Thu, 14 Sep 2006 17:03:22 +0000
State-Changed-Why:
Addressed in chap-midi branch merged in June.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.