Re: tutorial question: where mb() is needed?

Andrea Arcangeli (andrea@e-mind.com)
Thu, 7 Jan 1999 21:29:11 +0100 (CET)


On Wed, 6 Jan 1999, Ryan Moore wrote:

> Presumably all of this code isn't in a locked section for performance
> reasons. Instead, the scheduler is relying on the fact that the scheduler
> on another processor won't mess with this current process unless the
> has_cpu is zero.

Understood. But so what about spinlocks? Should we run a mb() a bit before
releasing every spinlock? When we release the spinlock obviously we need
that all write/read operation in the critical section are just finished
and flushed in order to avoid SMP races, right?

> Get the idea, yet?

Yes, many thanks!

Andrea Arcangeli

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