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.