Re: max throughput achievable with outb()

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

 



Peter Teoh wrote:
> On Wed, Sep 30, 2009 at 11:47 AM, Michal Ludvig <mludvig@xxxxxxxxxxxx> wrote:
>> Hi all,
>>
>> I've got a digital IO card hanging off an ISA bus in PC/104 system. I'm
>> pushing data packets to it, usually 16-32 bytes per transfer, 100x per
>> second.
>>
>> Apparently ISA bus clock is supposed to run at 8MHz and I expected to
>> achieve somewhat close-to-that performance with my driver. To test the
>> throughput I've got a simple loop in my kernel driver:
>>
>>    uint8_t data = 0;
>>    while(loops--) {
>>        outb(data, iobase);
>>        data = ~data;
>>    }
>>
>> A frequency probe reveals that the port status is changing at roughly
>> 250kHz (and other timing checks confirm it), which is far less than the
>> expected 8MHz.
>>
>> I've got two questions:
>> 1) Can I speed it up somehow?
> 
> generally, port i/o programming is always slower than mmio, why don't
> u consider that option?

Good idea. However ... does mmio need support on the isa-card side?

How do I map ioports 0x300-0x30B to some address accessible by readb() /
writeb()?

I can't work out the relation between isa address space (0xA0000 to
0x100000) and io ports (eg mine 0x300 to 0x30B range). What do I pass to
ioremap() [?] to get the ports accessible by readb/writeb?

Michal





--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux