Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12332

eMMC writes randomly takes longer time

$
0
0

I'm analysing how long time it takes to write 1MB to a eMMC. It is supposed to happen during powerfail, thus time is critical.

I found that the write can be done in 40 ms, which is fine.
However randomly (one out of several hundreds) it takes more than 200 ms, which is bad.

Why does these long write times happen. Is it Linux, or is it the eMMC which is doing some housekeeping. I suspect the eMMC, but I have not been able to find any articles about this. Any references would be appreciated.

I run this test script in my init script before anything else is launced, thus the script is alone with all the ressources

dd bs=4096 count=128 if=/dev/zero of=/tmp/e2t=0count=0while [ $t -lt 20 ]dot=$(time dd if=/tmp/e2 of=/rootfs/data/test-nvram bs=4M 2>&1)t=$(echo $t | awk /real/'{print $9}' | tr -d 's.' )echo $count $tcount=`expr $count + 1`done

I have also tried to write directly to /dev/mmcblk0p1 with the same result, thus the file system does not seem to matter.

Doing a lttng on a full system seems to indicate, that the CPU is waiting for an interrupt from the eMMC

My setup is
ARMv7 LS1021A dual core, 1GHz
Linux kernel 4.14.34
eMMC: Micron MTFC8GAKAJCN-4M IT


Viewing all articles
Browse latest Browse all 12332

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>