Re: alcor mmc driver slow I/O

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Daniel,

Am 18.03.19 um 10:09 schrieb Daniel Drake:
> Hi Oleksij,
> 
> Thanks again for your work on the new mmc alcor driver.
> 
> Testing it quickly for the first time, with a Transcend Class 10 32GB
> SD card that I have on hand (on Asus P4540UQ / AU6621). The driver
> seems to be working (cool!), but I/O performance is much lower than
> the ugly vendor driver (ampe_stor).
> 
> dd if=/dev/XXX of=/dev/null bs=1M count=32
> 
> On ampe_stor : 12.1mb/sec
> On new alcor driver: 364kb/sec

Uff... 364kb/sec is wary low. Feels like due some errors or missing capabilities the HI speed is not
enabled.

> I'm planning to investigate in more detail, but if you have any quick
> starting suggestions on things to check, that would be appreciated.

First of all, I would suggest to investigate if DMA is working. Second place to check, if card and
controller capabilities are matching (see CAP_ flags).

In general, the speed is affected by following factors:
- 4 bit vs 1 bit mode
- high speed mode, clock frequency.
- amount of data transferred in one request. It is limited to the FIFO buffer (if no DMA i used) and
DMA page alignment.

The DMA is tricky on this chip. There are following issues with it:
- the DMA transfer is confirmed by writing the buffer address to the controller.
- the buffer address for DMA should change, if same address is reused it may not get the change.
- max 32 bis space is supported. Probably lower address part is not supported (page alignment?)
- to provide same kind of performance as the ugly driver, we may request huge data transfer and some
how guarantee to change of the DMA buffer address, if we will be fast enough to process it in the
interrupt context. With the hope, interrupts are not blocked. It is really ugly for low latency
system. Without documentation I can't say here any thing.

And, it seems like there are no mechanism to prevent memory corruption by DMA, so be careful. May be
it is already happening on different systems with hard reproducible crashes and other mystical
issues. May be with ugly driver and on windows as well...

Probably, if you will know this chip good enough, you will try to avoid products with it ;)

-- 
Regards,
Oleksij



[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux