Re: Spinlocks
From: Pete Zaitcev (OTID3) (oted3354ac022639a1_at_comcast.net)
Date: 10/19/05
- Next message: Pete Zaitcev (OTID3): "Re: Spinlocks"
- Previous message: Perianayagam Somasundaram: "Re: syscall gettimeofday"
- In reply to: brankok_at_dkts.co.yu: "Spinlocks"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 18 Oct 2005 15:33:08 -0700
On Tue, 18 Oct 2005 00:13:30 -0700, brankok wrote:
> from concurrent access, so I decided to use spinlock mechanism. I've
> read about functions that work with spinlocks and I decided to use
> _irqsave versions of the premitives both in the interrupt and in the
> noninterrupt code. Now I'm wondering if I should have used spinlocks at
> all. Couldn't I have just disable interrupts in in the noninterrupt
> code, do the critical section and then enable interrupts? What am I not
> getting?
An interrupt can happen on other CPU (or core, in multi-core CPUs)
while interrupts are disabled in your current CPU.
Disabling interrupts across all CPUs requires cross-calls, which
are very expensive when compared with local interrupt disabling.
-- Pete
- Next message: Pete Zaitcev (OTID3): "Re: Spinlocks"
- Previous message: Perianayagam Somasundaram: "Re: syscall gettimeofday"
- In reply to: brankok_at_dkts.co.yu: "Spinlocks"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|