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