Catching up on kernel news while recovering from illness, Linux 3.18 was released a week ago like clockwork. As part of this release, there are two patches of mine inside.
Those are about adding DMA support to the MMC/SD card driver of the Ben NanoNote SoC -- namely the JZ4740 SoC.
Until now, the SD card driver was operating in PIO mode: solely relying on the CPU to transfer data between the SD card and main memory. The goal of the patches is to allow the driver to rely on DMA instead in order to improve performance.
So I started by adding DMA support by taking advantage of the DMA Engine driver that was already available for JZ4740. Trying to push performance further, I then took advantage of the asynchronous request capability of the MMC framework to prepare the next DMA transfer request in parallel with the current ongoing transfer.
I posted a few benchmarks with the patch series to track performance improvements. Please refer to LKML to read them (I'm not sure the text output would be correctly formatted on this blog, and I'm being too lazy to find out):
As you can read from my post on LKML, there is a minor improvement in average transfer time (going from 7 to 6 minutes to uncompress Fedora 16 ISO image) and CPU load. This is a good thing overall: considering the limited scope of my benchmark, the improvement might be even more noticeable while doing a bigger transfer while the CPU is under a heavier load.
Also, in hindsight, zcat was probably not a very good utility to benchmark memory transfers. Using dd may have given more relevant results and a better picture of the overall performance improvement gained by using DMA instead of CPU for memory transfers.
Anyway, here are links to the patches:
And a summary of all the changes by kernelnewbies.org: