summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/f_audio.c
diff options
context:
space:
mode:
authorPer Forlin <per.forlin@linaro.org>2011-08-19 21:21:27 +0200
committerFelipe Balbi <balbi@ti.com>2011-09-09 13:06:04 +0300
commit6532c7fdb2c3a2ec1b949ecd2ff5375069c1639a (patch)
tree26afd8fdff7923f818f49aa405bb4208d1da914e /drivers/usb/gadget/f_audio.c
parent04eee25b1d754a837360504b7af426d1f86ffeb7 (diff)
downloadlinux-6532c7fdb2c3a2ec1b949ecd2ff5375069c1639a.tar.gz
linux-6532c7fdb2c3a2ec1b949ecd2ff5375069c1639a.tar.bz2
linux-6532c7fdb2c3a2ec1b949ecd2ff5375069c1639a.zip
usb: gadget: storage: make FSG_NUM_BUFFERS variable size
FSG_NUM_BUFFERS is set to 2 as default. Usually 2 buffers are enough to establish a good buffering pipeline. The number may be increased in order to compensate a for bursty VFS behaviour. Here follows a description of system that may require more than 2 buffers. * CPU ondemand governor active * latency cost for wake up and/or frequency change * DMA for IO Use case description. * Data transfer from MMC via VFS to USB. * DMA shuffles data from MMC and to USB. * The CPU wakes up every now and then to pass data in and out from VFS, which cause the bursty VFS behaviour. Test set up * Running dd on the host reading from the mass storage device * cmdline: dd if=/dev/sdb of=/dev/null bs=4k count=$((256*100)) * Caches are dropped on the host and on the device before each run Measurements on a Snowball board with ondemand_governor active. FSG_NUM_BUFFERS 2 104857600 bytes (105 MB) copied, 5.62173 s, 18.7 MB/s 104857600 bytes (105 MB) copied, 5.61811 s, 18.7 MB/s 104857600 bytes (105 MB) copied, 5.57817 s, 18.8 MB/s FSG_NUM_BUFFERS 4 104857600 bytes (105 MB) copied, 5.26839 s, 19.9 MB/s 104857600 bytes (105 MB) copied, 5.2691 s, 19.9 MB/s 104857600 bytes (105 MB) copied, 5.2711 s, 19.9 MB/s There may not be one optimal number for all boards. This is why the number is added to Kconfig. If selecting USB_GADGET_DEBUG_FILES this value may be set by a module parameter as well. Signed-off-by: Per Forlin <per.forlin@linaro.org> Acked-by: Michal Nazarewicz <mina86@mina86.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/f_audio.c')
0 files changed, 0 insertions, 0 deletions