On 5/1/16 3:09 PM, Mark Kettenis wrote:
Date: Sat, 30 Apr 2016 13:31:21 +0200 (CEST)
From: Mark Kettenis <[email protected]>

From: John Troy <[email protected]>
Date: Fri, 29 Apr 2016 11:56:24 -0400

On 4/28/16 2:30 PM, Mark Kettenis wrote:
So here are just the bits that add DMA support.  Since Theo likes this
so much, I'd like to move forward with this.

ok?

Hi Mark,
This diff seems to break things on my Lenovo Ideapad 100s. The 100s has
an internal eMMC and a microSD card slot. As far as I can tell, reading
from a microSD card breaks both eMMC and microSD.

Reading from the eMMC, twice for good measure:
# dd if=/dev/rsd0c of=/dev/null bs=1M count=1
1+0 records in
1+0 records out
1048576 bytes transferred in 0.191 secs (5486853 bytes/sec)
# dd if=/dev/rsd0c of=/dev/null bs=1M count=1
1+0 records in
1+0 records out
1048576 bytes transferred in 0.190 secs (5506851 bytes/sec)

Reading from the microSD:
# dd if=/dev/rsd1c of=/dev/null bs=1M count=1
dd: /dev/rsd1c: Input/output error
0+0 records in
0+0 records out
0 bytes transferred in 3.019 secs (0 bytes/sec)

Reading from the eMMC again:
# dd if=/dev/rsd0c of=/dev/null bs=1M count=1
dd: /dev/rsd0c: Input/output error
0+0 records in
0+0 records out
0 bytes transferred in 0.004 secs (0 bytes/sec)

At this point the system is unusable, and there's nothing else
interesting in dmesg.
Can reproduce this on the Lenovo stick, which is in many ways very
similar to the 100s.  So far I've not found a solution.

Since the diff gives significant improvements and seems to be
completely stable if I leave the SD card slot empty, I've committed it
anyway.  You may want to revert the changes to dev/acpi/sdhc_acpi.c
for now if you intend to use the SD card slot on the 100s.

Hopefully I'll figure out what the problem is soon.  Otherwise I might
selectively disable DMA support on this hardware.
Found the problem.  Should be fixed with:

CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]        2016/05/01 11:13:55

Modified files:
         sys/dev/sdmmc  : sdhc.c

Log message:
Always write block count.  This fixes the DMA issues on Bay Trail.

Works like a charm. Raw eMMC reads went from ~3.5MB/s to ~35MB/s and microSD reads went from ~3MB/s to ~10MB/s. Writes to filesystems on these devices are a good deal quicker as well, about 4x and 2x, respectively.

These changes make a big difference in terms of usability. Thanks for your work on this, Mark.

-John

Reply via email to