Skip to contentSkip to conversation

Compact Flash PIO 4 tuning

DISCUSSION David Wuertele 2 participants 2 messages May 6, 2003 libata

lore
Share & tools
lore
#0 lore raw

Howdy,

I'm working on an embedded system that has a CF card on the IDE bus. The CF spec only allows PIO mode, and my card can do PIO 4. However, when I try to stream data from this card into memory at 2 MBytes per second, it pegs the CPU at 100%. This is ruining the performance of my application, which has to process this data in real time.

I realize that PIO 4 requires CPU involvement, but are there ways I can tune the kernel for copying large files to memory, so that my application doesn't get starved of CPU?

Thanks,
Dave

#1 lore raw
Quoted 11 lines · David Wuertele

Howdy,

I'm working on an embedded system that has a CF card on the IDE bus. The CF spec only allows PIO mode, and my card can do PIO 4. However, when I try to stream data from this card into memory at 2 MBytes per second, it pegs the CPU at 100%. This is ruining the performance of my application, which has to process this data in real time.

I realize that PIO 4 requires CPU involvement, but are there ways I can tune the kernel for copying large files to memory, so that my application doesn't get starved of CPU?

If you use the full bandwidth of the PIO device, you use 100% CPU. That's it and there's no way around. You can check that the IDE/CF interface is set to PIO4 and that under Linux you have IRQ unmasking enabled, those two will help, though the first statement is still valid.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR