blob: 3f052b9fb99996ff69abf688acbd9094dc6f7759 [file] [log] [blame]
Mark Salyzyn92f31302016-01-28 11:12:25 -08001eMMC Block layer simulation speed controls in /sys/block/mmcblk*/
2===============================================
3
4Turned on with CONFIG_MMC_SIMULATE_MAX_SPEED which enables MMC device speed
5limiting. Used to test and simulate the behavior of the system when
6confronted with a slow MMC.
7
8Enables max_read_speed, max_write_speed and cache_size attributes and module
9default parameters to control the write or read maximum KB/second speed
10behaviors.
11
12NB: There is room for improving the algorithm for aspects tied directly to
13eMMC specific behavior. For instance, wear leveling and stalls from an
14exhausted erase pool. We would expect that if there was a need to provide
15similar speed simulation controls to other types of block devices, aspects of
16their behavior are modelled separately (e.g. head seek times, heat assist,
17shingling and rotational latency).
18
19/sys/block/mmcblk0/max_read_speed:
20
21Number of KB/second reads allowed to the block device. Used to test and
22simulate the behavior of the system when confronted with a slow reading MMC.
23Set to 0 or "off" to place no speed limit.
24
25/sys/block/mmcblk0/max_write_speed:
26
27Number of KB/second writes allowed to the block device. Used to test and
28simulate the behavior of the system when confronted with a slow writing MMC.
29Set to 0 or "off" to place no speed limit.
30
31/sys/block/mmcblk0/cache_size:
32
33Number of MB of high speed memory or high speed SLC cache expected on the
34eMMC device being simulated. Used to help simulate the write-back behavior
35more accurately. The assumption is the cache has no delay, but draws down
36in the background to the MLC/TLC primary store at the max_write_speed rate.
37Any write speed delays will show up when the cache is full, or when an I/O
38request to flush is issued.