SMP spin-locks

Richard B. Johnson (root@chaos.analogic.com)
Thu, 14 Jun 2001 13:26:05 -0400 (EDT)


I __finally__ got back on "the list". They finally fixed the
company firewall!

During my absence, I had the chance to look at some SMP code
because of a performance problem (a few microseconds out of
spec on a 130 MHz embedded system) and I have a question about
the current spin-locks.

Spin-locks now transfer control to the .text.lock segment.
This is a separate segment that can be at an offset that
is far away from the currently executing code. That may
cause the cache to be reloaded. Further, each spin-lock
invocation generates separate code within that segment.

Question 1: Why?

Question 2: What is the purpose of the code sequence, "repz nop"
generated by the spin-lock code? Is this a processor BUG work-around?
`as` doesn't "like" this sequence and, Intel doesn't seem to
document it.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (799.53 BogoMips).

"Memory is like gasoline. You use it up when you are running. Of
course you get it all back when you reboot..."; Actual explanation
obtained from the Micro$oft help desk.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/