4.19.16 Kernel MMC SD Card Very Slow

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

jay214128
Posts: 23
Joined: Fri Jan 23, 2015 3:29 am

4.19.16 Kernel MMC SD Card Very Slow

Tue Apr 23, 2019 12:25 am

I am trying out the recent 4.19.16 kernel from https://github.com/linux4sam/linux-at91 ... -4.19-at91 and am seeing very slow performance from the MMC SD Card driver. This is on a AT91SAM9G45 SOC.

When booting from the SD card, as soon as the mmc driver loads, the booting process slows way down. Eventually, the board completes booting. I then also notice that the system seems busy (I get input overrun error messages on the debug console tty). This makes be think that whatever is slowing down the SD card, is also holding interrupts disabled or some other locking issue.

Booting from the NAND flash boots at a normal expected speed.

Comparing the 4.14 kernel with the 4.19 kernel, I can see some changes to the atmel-mci.c file. I reverted the sg_copy_xxx() changes (https://git.kernel.org/pub/scm/linux/ke ... 50eed27c87 and https://git.kernel.org/pub/scm/linux/ke ... 4e80201454) and the mmc SD card works properly again. The sg_copy_{from,to}_buffer() functions have a significant amount of overhead compared to the put_unaligned(), get_unaligned(), and memcpy() that it replaced.

Return to “LINUX”

Who is online

Users browsing this forum: No registered users and 3 guests