Messages in this thread | | | Date | Tue, 28 Sep 1999 16:36:37 +0300 | From | Momchil Velikov <> | Subject | Re: possible spinlock optimizations |
| |
Manfred wrote: > > I think there are 2 possible optimizations for spinlocks: > 1) spin_lock_irq(): What about enabling interrupts while spinning? > CPU1 owns the spinlock, ie it runs with disabled interrupts. > Now CPU2 tries to acquire the spinlock, it fails and it starts to spin. > - while spinning, there are no atomicity requirements. > - it would improve the interrupt responsiveness. Currently, both CPU's are > waiting/running with disabled interrupts. > - the change only affects the "slow path", it doesn't slow down the normal > case.
How do you atomically-acquire-the-lock-and-disable-interrupts (I assume we are talking about x86 here) ?
Regards, -velco
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |