Re: max throughput achievable with outb()

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

 



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?

http://en.wikipedia.org/wiki/Memory-mapped_I/O

> 2) Apparently it's quite a lot of time between calling outb() and its
> return. Can the kernel do something else in the meantime, like
> scheduling another process or handling interrupts, or is it blocked
> waiting for the outb() return? I'm on a uniprocessor x86 system.
>
> Any ideas or pointers?
>
> Thanks
>
> Michal
>
>
>
>
>
>
> --
> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>



-- 
Regards,
Peter Teoh

--
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