Re: SMP spin-locks

Pavel Machek
2001-06-16T10:11:37Z

Hi!

> The 'read()' routine uses a spinlock when it modifies pointers.
>
> I started to look into where all the CPU clocks were going. The
> SMP spinlock code is where it's going. There is often contention
> for the lock because interrupts normally occur at 50 to 60 kHz.
>
> When there is contention, a very long........jump occurs into
> the test.lock segment. I think this is flushing queues.

On UP, there's *never* contention on the lock, because irqsave lock
disables interrupts. Right? Something else must be slowing you.

Pavel
PS: But that's bad. Performance should not come down twice --
this will bite you even on real SMP.

--
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.