Re: [Q] Looking for an emulation for CMOV* instructions.

H. Peter Anvin (hpa@transmeta.com)
Sat, 12 Jan 2002 12:43:31 -0800


Adam J. Richter wrote:

>
> Your comment prompted me to look at
> linux-2.5.2-pre11/include/asm-i386/spinlock.h, and I now believe that
> the "lock; decb" that it uses for grabbing spinlocks will return an
> incorrect success if 255 or more processors are waiting on the same
> spinlock. I don't know if anybody has ever built a shared memory x86
> multiprocessor with 257 (not a typo) or more CPU's, but it's possible
> to imagine. It's also possible to imagine this scenario happening
> with even just one processor and a preemtable kernel. I believe that
> the current preemtable kernel patch limits the number of preempted
> processes to something like four or six, but that's just a temporary
> limitation of the current version.
>

Linux specificially does not allow for more processors than there are
bits in a long (32 or 64). Libc, however, since it counts processes,
not CPUs, uses a 4-byte word.

-hpa

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