Summary

Benchmark and profile USB gadget mass-storage code to identify bottlenecks

Release Note

USB Mass-storage gadget benchmarking and profiling results. [TODO: Add benchmark details and notes for any code implementation]

Rationale

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.

User stories

Read performance of USB mass-storage flash disks are in the range of 20MB/s to 30MB/s

[source:http://www.codinghorror.com/blog/2008/06/large-usb-flash-drive-performance.html ]

Where as OMAP35x performance with kernel v2.6.32 is reported to be 14MB/s

[source:http://processors.wiki.ti.com/index.php/AM35x-OMAP35x-PSP_03.00.00.05_Feature_Performance_Guide#Performance_Benchmarks_6]

This may not be a fair comparison but it shows that the margin for improvement is there.

Assumptions

Platform including high speed USB function preferably with DMA support

Design

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

Implementation

- 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

Test/Demo Plan

- Profiling results

- Benchmarking results

- Suggestions to overcome identified bottlenecks and demonstrate performance improvement if any such changes are implemented.

Unresolved issues

BoF agenda and discussion


CategorySpec

WorkingGroups/KernelArchived/Specs/StoragePerfUSB (last modified 2013-01-14 19:31:17)