Re: spin_unlock optimization

Rik van Riel (riel@nl.linux.org)
Thu, 30 Dec 1999 19:19:58 +0100 (CET)


On Thu, 30 Dec 1999, Gabor Lenart wrote:
> On Wed, Dec 29, 1999 at 07:44:02PM +0100, Oliver Henning wrote:

> > as was mentioned on Kernel Traffic, the spin_unlock optimization (movb $0,%0
> > instead of lock; btrl $0,%0) is not used at last. But could there be a
> > detection routine (I know this is not a completely new and innovative idea)
> > for those older PPro CPUs that require the slow version so that in the sane
> > cases the optimization would be used.
>
> Yes. Runtime option is not acceptable imho. movb $0,%0 can be fast
> but if you need a conditional instruction to test if the fast
> version can be used uses more and more cycles.

Self-modifying code?

/me runs

Rik

--
The Internet is not a network of computers. It is a network
of people. That is its real strength.

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