Re: Linux serial port dropping bytes



Grant Edwards wrote:
....
Changing ISR priority isn't going to make any difference.

It only determines which of two pending interrupts get
serviced. It doesn't allow "higher" priority interrupts to
preempt lower priority ones. If a low-priority ISR runs for a
long time, it's still going to block high-priority ISRs for the
whole time it's running.

Sadly true, except on 68k/coldfire platforms. Some newer
PPC parts from Freescale offer separate mask bits for two interrupts
(6809 F and I like), which is not bad either.
Of course if the system has been designed properly and written
properly (are they ever in commecrial land?... :-) ), every IRQ
handler
would reenable IRQ after a few cycles only - some of the Freescale
PPC parts have a good priority encoder in front of the core IRQ input
and things will then in effect be as good as in a 68k/CF. But good
luck
enforcing that if more than 1 person is doing the work... -).

Dimiter

------------------------------------------------------
Dimiter Popoff Transgalactic Instruments

http://www.tgi-sci.com
------------------------------------------------------
http://www.flickr.com/photos/didi_tgi/sets/72157600228621276/


Grant Edwards wrote:
On 2008-04-01, Derek Young <edu.mit.LL@xxxxxxxxxxxxx> wrote:

Yes, I feel like there should be plenty of time to handle the
interrupts. But from what I understand (which isn't a whole
lot mind you :P), Linux isn't strictly a real-time OS. It
doesn't normally have a preemptible kernel (I've turned on the
"experimental" preemptible kernel flag) and it doesn't really
have a standard way to tweak interrupt priorities.

Was wondering if anybody knew of a straight-forward hack. I
just want the serial port ISR to get priority over the device
driver ISRs.

Changing ISR priority isn't going to make any difference.

It only determines which of two pending interrupts get
serviced. It doesn't allow "higher" priority interrupts to
preempt lower priority ones. If a low-priority ISR runs for a
long time, it's still going to block high-priority ISRs for the
whole time it's running.

--
Grant Edwards grante Yow! As President I have
at to go vacuum my coin
visi.com collection!
.



Relevant Pages

  • Re: Linux serial port dropping bytes
    ... doesn't normally have a preemptible kernel (I've turned on the ... Changing ISR priority isn't going to make any difference. ... It only determines which of two pending interrupts get ...
    (comp.arch.embedded)
  • Re: Linux serial port dropping bytes
    ... Changing ISR priority isn't going to make any difference. ... It only determines which of two pending interrupts get ... context). ...
    (comp.arch.embedded)
  • Re: How to change interrupt priority
    ... Although the ISR really doesn't do much other than 'sums' ... > and service our hardware, there are a lot of calcs and time spent in the ... > for lower priority interrupts to wait for us. ...
    (microsoft.public.windowsce.platbuilder)
  • PIC Interrupts - C18 compatibility mode
    ... I'd appreciate some advice on PIC interrupts under M'chip C18. ... C18, which is new to me, C18 is a good deal more complex than the C ... only one ISR involved. ... the high priority vector in 18F priority mode. ...
    (sci.electronics.design)
  • Re: how to minimize interrupt latency using interrupt affinity in
    ... it would be VERY useful if the CPU or ISR ... one can see nested interrupts etc). ... my ISR runs on a processor core which is not ever used by other ISRs: ... even though I set affinity to 0x3 for all drivers ...
    (microsoft.public.development.device.drivers)