History

mmc: alcor: work with multiple-entry sglists

DMA on this hardware is limited to dealing with a 4096 bytes at a time. Previously, the driver was set up accordingly to request single-page DMA buffers, however that had the effect of generating a large number of small MMC requests for data I/O. Improve the driver to accept multi-entry scatter-gather lists. The size of each entry is already capped to 4096 bytes (AU6601_MAX_DMA_BLOCK_SIZE), matching the hardware requirements. Existing driver code already iterates through remaining sglist entries after each DMA transfer is complete. Also add some comments to help clarify the situation, and clear up some of the confusion I had regarding DMA vs PIO. Testing with dd, this increases write performance from 2mb/sec to 10mb/sec, and increases read performance from 4mb/sec to 14mb/sec.

Daniel Drake committed 7 years ago

Commit c671b6d1 parent f19337d2 files · +37 −19Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/alcor_pci.h+1−1
@@ -23,7 +23,7 @@ · 22 unmodified lines
2323 #define AU6601_BASE_CLOCK 31000000
2424 #define AU6601_MIN_CLOCK 150000
2525 #define AU6601_MAX_CLOCK 208000000
26−#define AU6601_MAX_DMA_SEGMENTS 1
26+#define AU6601_MAX_DMA_SEGMENTS 64
2727 #define AU6601_MAX_PIO_SEGMENTS 1
2828 #define AU6601_MAX_DMA_BLOCK_SIZE 0x1000
2929 #define AU6601_MAX_PIO_BLOCK_SIZE 0x200

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t