Changes

Jump to: navigation, search
Appendix 2: Video
* "Example: embedded Linux system equipped with SanDisk SDINBDG4-8G-XI1 eMMC and <code>ext4</code> file system"
|-
|{{oldid|15868|2.0.1}}
|January 2022
|Minor changes
|-
|{{oldid|16652|3.0.0}}
|May 2022
|Added detailed analysis of e.MMC accesses (SanDisk SDINBDG4-8G-XI1)
|-
|3.1.0
|June 2022
|Added video of technical presentation by Lauterbach Italy
|}
Regardless of the file system used, e.MMC devices provide some functionalities conceived to monitor their health while operating. As these functionalities are defined by [https://www.jedec.org/sites/default/files/docs/JESD84-B51.pdf JEDEC standards], all the vendors implement them.
In practice, e.MMC's integrates integrate some registers providing specific information about the health status. These registers can be accessed with the <code>mmc-utils</code>, which are documented [https://www.kernel.org/doc/html/latest/driver-api/mmc/mmc-tools.html here]. Interestingly, JEDEC standard also defines a set of registers (<code>VENDOR_PROPRIETARY_HEALTH_REPORT</code>) that vendors are free to use for providing further, fine-grained information about the device's health status. Engineers and system integrators are supposed to contact the e.MMC manufacturer to get the required tools for accessing such registers.
The sections related to eMMC-based use cases are the result of a joint effort between [https://www.westerndigital.com/ Western Digital] (which purchased [https://en.wikipedia.org/wiki/SanDisk SanDisk] in 2016), [https://www.lauterbach.it Lauterbach Italy], and DAVE Embedded Systems. Parts of such sections are retrieved from the White Paper ''TRACE32 log method for analysing accesses to an eMMC device'' by Lauterbach, which is freely available for download [https://www.lauterbach.com/publications/trace32_log_method_for_analysing_accesses_to_an_emmc_device.pdf here].
[[File:Lauterbach-logo.png|center|thumb|308x308px]]
</pre>
===== Verification =====
To verify the implementation of the TRACE32-based method, a specific test was run. In essence, the testbed was configured in order to run TRACE32 and <code>ftrace</code> tracing — more details in the following section — simultaneously for analyzing the same workload. The logs produced by the two methods were then compared to ensure they match. To this end,  These logs
==== Results and comparison with the software-based method (<code>ftrace</code>) ====
The following chart shows the e.MMC accesses over time during the execution of the workload along with other measurements such as read/write throughput.
[[File:MISC-TN-017-eMMC-chart1.png|center|thumb|600x600px800x800px|e.MMC accesses over time]]
It is also possible to extrapolate the latency of the operations.
[[File:MISC-TN-017-eMMC-chart3-latency.png|center|thumb|600x600px800x800px|Latency]]
Another extremely useful graphical depiction is the chunk size distribution. For instance, this information is often used to understand how efficient the user application is when it comes to optimize the write operations for maximizing the e.MMC lifetime. The pie on the left refers to the read operations, while the other one refers to the write operations.
[[File:MISC-TN-017-eMMC-chart2-chunk-size.png|center|thumb|600x600px800x800px|Chunk size distribution]]To interpret the result, one needs to take into account how the workload was implemented. In the example under discussion, the workload basically makes use of two applications: <code>[https://man7.org/linux/man-pages/man1/dd.1.html dd]</code> and <code>stressapptest</code>. <code>dd</code> was specified to use 4-kByte data chunks (<code>bs=4k</code>). <code>stressapptest</code> uses 512-byte chunks instead because the <code>--write-block-size</code> parameter was not used (for more details please refer to the [https://github.com/stressapptest/stressapptest/blob/e6c56d20c0fd16b07130d6e628d0dd6dcf1fe162/src/worker.cc#L2615 source code]). As a result, one would expect that the majority of accesses are 512 bytes and 4 kByte. The charts clearly show that this is not the case. Most of the accesses are 512kB instead. This is a blatant example of how the algorithms of the file systems and the kernel block driver can alter the accesses issued at application levels level for optimization purposes.
==== Appendix 1: source code example ====
}
</syntaxhighlight>
 
==== Appendix 2: Video ====
Technical Note presentation by Lauterbach (Language: Italian; Subtitles: English and Italian)
{{#ev:youtube|YDWAGy2QnA0|600|center|Persistent storage and read-write file systems|frame}}
=== Device's built-in advanced functionalities ===
As explained in [[#Embedded Linux systems with eMMC or SD cards|this section]], e.MMC 's feature specific registers advanced functionalities that are useful for monitoring the health of the device. Some of these registers provides a Following is a dump of the standard registers of the targte's e.MMC related to the wear-out status of the deviceand, namely <code>DEVICE_LIFE_TIME_EST_TYP_B</code>, <code>DEVICE_LIFE_TIME_EST_TYP_B</code>in general, and <code>PRE_EOL_INFO</code>. TBD It is worth remembering that some providers use the additional proprietary registers to provide information about the amount health of data that have been actually written on to the device. If availableFor more details, please see the section [[#Example: embedded Linux system equipped with an e.MMC|this number allows to calculate the WAF as the amount of data written by the applications of the test workload is know as wellsection]].
=Power failures=
== Example: embedded Linux system equipped with an e.MMC ==
As explained in [[#DeviceEmbedded Linux systems with eMMC or SD cards|this section]], e.MMC's builtprovide specific functionalities for device's health monitoring. In practice, these components expose some registers that make health-in advanced functionalitiesrelated information available to the host.  Following is a dump of the such registers regarding the wear-out status of the device, namely <code>DEVICE_LIFE_TIME_EST_TYP_B</code>, <code>DEVICE_LIFE_TIME_EST_TYP_B</code>, and <code>PRE_EOL_INFO</code>: <pre class="board-terminal">root@desk-mx8mp:~# mmc extcsd read /dev/mmcblk2 |heregrep LIFEeMMC Life Time Estimation A [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_A]: 0x01eMMC Life Time Estimation B [EXT_CSD_DEVICE_LIFE_TIME_EST_TYP_B]: 0x01root@desk-mx8mp:~# mmc extcsd read /dev/mmcblk2 | grep EOLeMMC Pre EOL information [EXT_CSD_PRE_EOL_INFO]: 0x01</pre>This dump refers to the same testbed described here. Some manufacturers use additional proprietary registers also for providing information about the amount of data that have been actually written onto the device. If available, this number allows to calculate the WAF given that the amount of data written by the applications of the test workload is known too. The health status registers can be exploited to implement a monitoring mechanismas well. For example, a user-space application may can poll periodically the status of the device and take actions accordingly if the wear-out exceeds predefined thresholds.  Last but not least, it is worth remembering that advanced proprietary off-line tools may also be available for health monitoring. For instance, Western Digital provides such tools for its devices. For more information, please contact our [mailto:sales@dave.eu Sales Department].
= References =
dave_user, Administrators
5,138
edits

Navigation menu