Re: Linux serial port dropping bytes



On 2008-04-01, Didi <dp@xxxxxxxxxxx> wrote:
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.

The Hitachi H8 series has the same feature, but linux doesn't
allow one ISR to preempt another ISR even if the hardware is
capable of that.

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

In Linux, the point where interrupts can be re-enabled is the
end of the ISR. The portion of the event handling that can be
done with other interrupts enabled is done in a different
context. Back in the day, Linux ISRs used be divided into a
top half and a bottom half, with the re-enabling of interrupts
occurring between the two (both halves ran in a single ISR
context). But, now the portion of the ISR that used to run with
interrupts enabled is a "soft irq" or a tasklet or something
like that (it runs in a different context, not in an ISR
context). At least that's the way it was the last time I
looked...

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

Even with only 1 person, you're chances aren't great. :)

--
Grant Edwards grante Yow! I need to discuss
at BUY-BACK PROVISIONS
visi.com with at least six studio
SLEAZEBALLS!!
.



Relevant Pages

  • 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 ... preempt lower priority ones. ...
    (comp.arch.embedded)
  • 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: 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)
  • Re: how to minimize interrupt latency using interrupt affinity in
    ... it would be VERY useful if the CPU or ISR usage ... one can see nested interrupts etc). ... used by other drivers' interrupts and that only core 3 is used by my ISR. ...
    (microsoft.public.development.device.drivers)
  • Re: interrupts vs function calls
    ... a)Can key board clicks be considered as hardware interrupts or software ... Interrupts can happen at any time, so an ISR can't count on _anything_ being saved, beyond whatever context the processor saves in the interrupt process. ...
    (comp.arch.embedded)