Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Apple16X50Serial] How to prevent HW buffer overflows?



On Nov 26, 2003, at 9:47 AM, Alexander Traud wrote:
The Apple16x50 driver sources available on the OpenDarwin cvsweb don't show any signs of installing an interrupt filter, so you are the mercy of the scheduling of its interrupt thread when it comes to latency. In the face of other interrupts or kernel threads, you may be looking at tens or hundreds of milliseconds worth of latency.

You mean Apple16X50UARTSync is too slow, or? Can we adjust the priority of the interrupt handler as client of Apple16X50UARTSync?

The standard way of handling interrupts in IOKit is to queue them and service them when the driver gets scheduled. This works very well for devices with large FIFOs, but not so well for devices with small FIFOs. However, IOKit also lets you install an "interrupt filter" which gets a chance to handle the interrupt as it happens, though it cannot do anything that blocks or takes much time.

Using an IOKit interrupt filter to unload the hardware FIFO into a queue in main memory, and then read out of that queue in the regular interrupt service routine, might work better than the strategy in Apple16X50UARTSync.

you need an interrupt filter so that you can run *immediately* the UART
> signals the FIFO is filling.

Does this mean we have to rewrite the complete Apple16X50UARTSync or is possible to add this "feature" easily to Apple16X50UARTSync. We are quite new at the interupt level.

It should be possible to add to Apple16X50UARTSync. How easy this would be, I don't know, but I don't imagine you'd have to rewrite the entire driver.


Amanda Walker
_______________________________________________
darwin-drivers mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-drivers
Do not post admin requests to the list. They will be ignored.

References: 
 >[Apple16X50Serial] How to prevent HW buffer overflows? (From: Alexander Traud <email@hidden>)
 >Re: [Apple16X50Serial] How to prevent HW buffer overflows? (From: drivers <email@hidden>)
 >Re: [Apple16X50Serial] How to prevent HW buffer overflows? (From: Alexander Traud <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.