Re: spin_unlock optimization(i386)

Andrea Arcangeli (andrea@suse.de)
Wed, 24 Nov 1999 17:32:55 +0100 (CET)


On Tue, 23 Nov 1999, Erich Boleyn wrote:

>The only thing you need is to make sure there is a store in "spin_unlock()",

So we could reimplement a rmb() (and in turn an mb()) that scales in SMP?
Something like:

#define rmb() ... "movb $0, ZERO_PAGE+32*smp_processor_id()"

This because the spin_unlock really is:

mb();
spin_lock.lock = 0;

If spin_unlock() doesn't need the lock, mb() doesn't need the lock
on the bus either.

Am I missing something?

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/