Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [chap-midi] src/sys/dev/usb



Module Name:    src
Committed By:   chap
Date:           Sat May 20 03:34:22 UTC 2006

Modified Files:
        src/sys/dev/usb [chap-midi]: umidi.c umidivar.h

Log Message:
Using full wMaxPacketSize transfers on receive (earlier patch, kern/32441)
was a substantial performance improvement, so it made sense to do so with
transmit buffers also (this patch).  A little benchmarking....

Before this patch:

$ </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)

...transmitting to one port only of a Midisport 2x4, achieving barely 16%
of the original 1983 MIDI spec data rate.

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.


To generate a diff of this commit:
cvs rdiff -r1.25.2.9 -r1.25.2.10 src/sys/dev/usb/umidi.c
cvs rdiff -r1.8.14.7 -r1.8.14.8 src/sys/dev/usb/umidivar.h

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




Home | Main Index | Thread Index | Old Index