Not really - it prevents another processor entering the same code
segment (spin_lock_irqsave prevents both another processor and
local interrupts).
An interrupt on UP can not wait on a spin lock - it will never be released
since no other code than the interrupt spinning will be able to execute)
> > What kind of performance problem do you have?
>
> The problem is that a data acquisition board across the PCI bus
> gives a data transfer rate of 10 to 11 megabytes per second
> with a UP kernel, and the transfer drops to 5-6 megabytes per
> second with a SMP kernel. The ISR is really simple and copies
> data, that's all.
>
> 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.
>
SMP compiled kernel, but running on UP hardware - right?
Then this _should not_ happen!
see linux/Documentation/spinlocks.txt
Is it your spinlocks that are causing this, or?
> When there is contention, a very long........jump occurs into
> the test.lock segment. I think this is flushing queues.
>
It does not matter, if there is contention - let it take time. Waiting is what
spinlocking is about anyway...
/RogerL
-- Roger Larsson Skellefteċ Sweden - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/