-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
During MP safety tests I stumbled across spurious interrupts which I think are caused by a race condition between triggering and EOI. The scenario leading to an error is the following:
Trigger Thread Receiver Thread
------------------------------------------------------
Set IRR
Prioritize -> yes
INTR
INTA
DEASS
EOI: Clear ISR
Set IRR
Prioritize -> yes
EOI: Prioritize -> yes
INTR
INTA
DEASS
EOI
INTR
INTA -> spurious!
This effect can be emphasized by adding some artificial delay between the trigger thread's prioritize function and the actual INTR message. In a very basic standalone PIC model I created to simplify hunting this issue, I found that the optimization setting is also important (with -O0 I have to add the delay to see anything at all).
Now I have basically two questions:
- Does the above scenario make sense or am I missing something?
- What is an appropriate solution to it? I don't think this is a MP-related problem, because the same course of events could occur between different threads on the same CPU. It is just highly unlikely to happen.
@vmmon, @blitz, @udosteinberg, any suggestions as to how this can be solved elegantly are very much appreciated.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels