Julian Elischer posted an interesting proof-of-concept to freebsd-current
authorMatthew Dillon <dillon@dragonflybsd.org>
Thu, 8 Jul 2004 03:53:54 +0000 (03:53 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Thu, 8 Jul 2004 03:53:54 +0000 (03:53 +0000)
commit467306a60cba4f60e5fbf5411e3849d88b5ed2bf
tree719d980e1ced43c2a0ec6f98fd5939f9f658c1e8
parent2cc4681014efa5785bb5088151e6e19d10f38bd7
Julian Elischer posted an interesting proof-of-concept to freebsd-current
regarding UGEN's use of a 1K stack buffer for bulk IO issues.  The small
block size resulted in unnecessarily slow performance with certain devices.

Implement a fix along the lines described.  Create a simple ugen buffer
allocator abstraction and a one-entry cache to avoid unnecessary malloc/free
sequences.  Allow the block size to be set with a sysctl and default it
to 16K.

Not much uses UGEN.  Camera software, mainly.  The change appears to
slightly improve s10sh transfer performance from my Canon 10D.
sys/conf/files
sys/dev/usbmisc/ugen/Makefile
sys/dev/usbmisc/ugen/ugen.c
sys/dev/usbmisc/ugen/ugenbuf.c [new file with mode: 0644]
sys/dev/usbmisc/ugen/ugenbuf.h [new file with mode: 0644]