Re: Re: [Rtlinuxgpl] Interrupt Prioritization

"Calin A. Culianu" <[email protected]> Tue, 3 Jan 2006 17:48:35 -0500 (EST)
Newsgroups gmane.linux.real-time.rtlinux.general
Message-ID <[email protected]>

On Tue, 3 Jan 2006, Victor Yodaiken wrote:

> On Tue, 2006-01-03 at 17:24 -0500, Calin A. Culianu wrote:
>>
>> On Tue, 3 Jan 2006, Victor Yodaiken wrote:
>>
>>> Set the priorities right. The logic is, or should be,
>>> take an interrupt on whatever task is running
>>> call sem post
>>> if waking a thread of higher priority then switch immediately.
>>>
>>> So what you need is to make sure your higher priority thread has been
>>> set to a higher priority.
>>>
>>> Does that work?
>>>
>>>
>>
>> Umm.. oh I get it.  So my ISR needs to have higher priority than my
>> bottom-half worker thread?
>>
>
> No, I explained it badly.
> You have (A) short ISR code and (B) lower priority fill thread and (C)
> high priority other thread.
> SEt the priority of C to be high.
>
> Then if C is running the worst case is an interrupt (A), then sem_post
> which wakes (B) and the scheduler realizes (C) should still run.
> But if B is running and C becomes runnable, C preempts B.

OK.  I get it.  One last question.  "If B is running and C becomes 
runnable... ".

That happens if the timer interrupt fires, right?

So that means that the timer interrupt is always on when rt tasks are running?

Is that always ok?  I mean doesn't that sort of introduce lots of jitter?

(I am sure I can research this myself.. but your help is appreciated!!)


_______________________________________________
Rtl mailing list
[email protected]
http://hq.fsmlabs.com/mailman/listinfo/rtl
http:/www.rtlinux-gpl.org/