[Bug 1580] New: spi-sd-card: use bigger chunks and yield processor while waiting for read data
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Mon Jun 21 16:55:17 UTC 2010
https://www.rtems.org/bugzilla/show_bug.cgi?id=1580
Summary: spi-sd-card: use bigger chunks and yield processor
while waiting for read data
Product: RTEMS
Version: HEAD
Platform: All
OS/Version: RTEMS
Status: NEW
Severity: enhancement
Priority: P3
Component: misc
AssignedTo: sebastian.huber at embedded-brains.de
ReportedBy: arnout at mind.be
CC: joel.sherrill at oarcorp.com
Depends on: 1567
Created an attachment (id=811)
--> (https://www.rtems.org/bugzilla/attachment.cgi?id=811)
spi-sd-card.c: do read polling in bigger blocks and yield the CPU
The function sd_card_read() polls the SPI bus until the data is available. On
various SD cards, I've seen latencies between 5 and 200 bytes.
First of all, reading in chunks of 18 bytes is not efficient since the DMA of
the SPI remains under-used.
Second, while we wait, other tasks should be allowed to take over.
Attached patch uses bigger chunks while waiting for the read data and yields
the processor. It depends on attachment 792 to bug 1567.
Note that sleeping like in attachment 810 to bug 1579 is not efficient since
the waiting time tends to be far below 1 tick. Sleeping reduces the read
throughput significantly.
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list