Re: Spinlocks

From: Pete Zaitcev (OTID3) (oted3354ac022639a1_at_comcast.net)
Date: 10/19/05


Date: Tue, 18 Oct 2005 15:35:06 -0700

On Tue, 18 Oct 2005 13:08:53 +0200, Kasper Dupont wrote:
> "Peter T. Breuer" wrote:
>>
>> So long as he disables interrupts on ALL CPUs at once, there should be
>> no problem, since the resource (the interrupt generator) is now guarded.
>
> Disabling interrupts across all CPUs is a very expensive
> operation. And I'm not even sure it would give you the
> protection you need.

It would. That's how cli() worked in Alan's SMP. But yes, it's hideously
expensive, because a cross-call is involved.

-- Pete