Re: RT-Linux and SMP

Linus Torvalds (torvalds@transmeta.com)
Thu, 24 Apr 1997 10:44:11 -0700 (PDT)


On Thu, 24 Apr 1997, Victor Yodaiken wrote:
>
> 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?

Two interrupts can run at the same time even under UP ("same time" in a
very limited sense, obviously - but one interrupt can interrupt the
other). As such, if we are ever in a critical section where this makes a
difference, that critical section obviously has to do a cli/sti.

And they do.

> In any event, I think that the rtlinux soft-interrupts fits into this
> scheme quite well and should make the irq_lock unecessary.

I don't believe you can make the irq_lock unnecessary - _something_ like
that is needed anyway.

Linus