Re: RT-Linux and SMP
Victor Yodaiken (yodaiken@chelm.cs.nmt.edu)
Thu, 24 Apr 1997 11:32:15 -0600
On Apr 24, 10:03am, Linus Torvalds wrote:
Subject: Re: RT-Linux and SMP
>We _have_ to wait for all outstanding interrupt handlers to complete,
>because otherwise "cli()" would be totally useless. For example:
>
> cli():
> .. do critical thing ..
> sti():
>
>if the cli() only makes sure that this CPU is the only one currently in
>"cli mode", there could be an interrupt executing on another CPU that
>started _before_ we did the cli(), and happens to be executing during our
>critical region. If that interrupt then happens to use or modify the same
>data that we are using in the critical region, we're dead.
Sure. But you are permitting two interrupts to execute at the same time
as long as neither invokes cli. So what prevents those two routines from
modifying each others data? If interrupt routines executing in non-cli
mode can modify shared data, wouldn't this cause a problem for SMP and even
in the single processor case?
In any event, I think that the rtlinux soft-interrupts fits into this
scheme quite well and should make the irq_lock unecessary.