Re: possible spinlock optimizations

Andrea Arcangeli (andrea@suse.de)
Tue, 28 Sep 1999 17:23:07 +0200 (CEST)


On Tue, 28 Sep 1999, Momchil Velikov wrote:

>How do you atomically-acquire-the-lock-and-disable-interrupts
>(I assume we are talking about x86 here) ?

No. You acquire the lock with irq disabled as usual.

If you are not been succesfully in grabbing the lock you go to the slow
path where you don't try to grab the lock each time to not ping pong the
cachelines everywhere and to not flood the bus with lock signals. During
such loop you can enable irqs.

Andrea

-
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/