Benchmark and profile USB gadget mass-storage code to identify bottlenecks
USB Mass-storage gadget benchmarking and profiling results. [TODO: Add benchmark details and notes for any code implementation]
In hand held devices USB gadget mass-storage is widely used to exchange user content with a PC.
As high definition media content is becoming more and more popular, in such applications it is important to provide high USB bandwidth for better user experience.
Read performance of USB mass-storage flash disks are in the range of 20MB/s to 30MB/s
Where as OMAP35x performance with kernel v2.6.32 is reported to be 14MB/s
This may not be a fair comparison but it shows that the margin for improvement is there.
Platform including high speed USB function preferably with DMA support
Use Ftrace (and Perf tools if needed) to investigate latencies and bottlenecks. Few things to look for:
- Buffer sizes and numbers
- DMA performance and impact on buffer types
- Use of different buffer memory types for control and data
- Cache performance (control: hit/miss rate, data: invalidating, flushing)
- Opportunities to parallelize work
- What is the data size threshold for using PIO vs DMA. Can we get better performance by mixing these modes in the driver.
- Maximum time gadget mass-storage driver waits to send or receive data.
Analyze with Wireshark:
- Maximum time USB host waits to send or receive data
- Add U8500 support in MUSB driver DONE
- Add DMAENGINE support in MUSB driver INPROGRESS
- Ftrace function-graph tracer for ARM (Patches recently submitted by Tim Bird and Rabin Vincent) POSTPONED
- Script for measuring read/write performance (from the host) POSTPONED
- Scripts for profiling usb, vfs or any other related code with Ftrace POSTPONED
- Profile USB gadget mass-storage code POSTPONED
- Profile vfs read / writes (mostly SD/eMMC read/write are of interest, possible overlap with K5.1 and K5.2) POSTPONED
- Use perf counters if needed/helpful POSTPONED
- Benchmark with IOZone or any other benchmark identified in K5.4 POSTPONED
- Profiling results
- Benchmarking results
- Suggestions to overcome identified bottlenecks and demonstrate performance improvement if any such changes are implemented.
BoF agenda and discussion
WorkingGroups/KernelArchived/Specs/StoragePerfUSB (last modified 2013-01-14 19:31:17)