This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3352: read and write speeds of files on the am3352 platform

Part Number: AM3352

Tool/software:

Hi, our company is currently having an issue with the read and write speeds of files on the am3352 platform across different kernel versions. In the 4.9 kernel, reading and writing files takes longer than in the 3.2 kernel(It's the same for NAND flash and SD cards.). Here are the specific details:

  • kernel version:we have two version 4.9.69 and 3.2.0
  • flash memory(Partitioning Format): nandflash(ubi), sd card(ext3, fat32)
  • Testing Methods: Write and read 400 bytes of data in the file.
  • We used the strace tool to capture the system call times.
  • test program, glibc library, and strace version are all the same.

        1. sd card(ext3)

        Time-consuming:

       4.9.69 version:                                                                                                    3.2.0 version:

                                  

      We used the strace tool to view the time spent on system calls:

      4.9.69 version:   

      

gettimeofday({545, 458889}, NULL)       = 0 <0.000029>
open("data.txt", O_WRONLY|O_CREAT|O_TRUNC, 0644) = 3 <0.000248>
write(3, "\211\251\4f\361\336=\r\227#\3375@\276\270w4\267^B\214tN)p\333;\35{\373\301`"..., 400) = 400 <0.000136>
close(3)                                = 0 <0.000045>
gettimeofday({545, 459992}, NULL)       = 0 <0.000205>
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 64), ...}) = 0 <0.000037>
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B115200 opost isig icanon echo ...}) = 0 <0.000050>
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb6f93000 <0.000055>
write(1, "Write operation took 1103 micros"..., 40) = 40 <0.000154>
gettimeofday({545, 461644}, NULL)       = 0 <0.000030>
open("data.txt", O_RDONLY)              = 3 <0.000068>
read(3, "\211\251\4f\361\336=\r\227#\3375@\276\270w4\267^B\214tN)p\333;\35{\373\301`"..., 400) = 400 <0.000055>
close(3)                                = 0 <0.000036>
gettimeofday({545, 462353}, NULL)       = 0 <0.000027>
write(1, "Read operation took 709 microsec"..., 38) = 38 <0.000042>

      3.2.0 version: 

     

gettimeofday({2147269168, 694044}, NULL) = 0 <0.000028>
open("data.txt", O_WRONLY|O_CREAT|O_TRUNC, 0644) = 3 <0.000207>
write(3, "\271{\307F9_\367s\205\264Ml\16\237y\177\233#'3S\256D\33}\4\357\7\305&(6"..., 400) = 400 <0.000115>
close(3)                                = 0 <0.000040>
gettimeofday({2147269168, 695064}, NULL) = 0 <0.000025>
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(250, 0), ...}) = 0 <0.000031>
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B115200 opost isig icanon echo ...}) = 0 <0.000047>
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40247000 <0.000053>
write(1, "Write operation took 1020 micros"..., 40) = 40 <0.000142>
gettimeofday({2147269168, 696538}, NULL) = 0 <0.000026>
open("data.txt", O_RDONLY)              = 3 <0.000050>
read(3, "\271{\307F9_\367s\205\264Ml\16\237y\177\233#'3S\256D\33}\4\357\7\305&(6"..., 400) = 400 <0.000037>
close(3)                                = 0 <0.000032>
gettimeofday({2147269168, 697227}, NULL) = 0 <0.000025>
write(1, "Read operation took 689 microsec"..., 38) = 38 <0.000044>

     We found that the time taken for each system call in version 4.9 is higher than that in version 3.2. Why is this?

         2. nandflash(The timing of GPMC is the same.  )  , sd card(fat32)

           Same as above.

            We want to know which aspect of the problem this is, kernel issue? DDR issue?

            After all, there is a considerable difference in kernel versions.

            I hope to get some help. Thank you very much.