[lkml]   [2005]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits
Linus Torvalds a écrit :
> On Tue, 11 Oct 2005, Eric Dumazet wrote:
>>As NR_CPUS might be > 128, and every spining CPU decrements the lock, we need
>>to use more than 8 bits for a spinlock. The current (i386/x86_64)
>>implementations have a (theorical) bug in this area.
> I don't think there are any x86 machines with > 128 CPU's right now.
> The advantage of the byte lock is that a "movb $0" is three bytes shorter
> than a "movl $0". And that's the unlock sequence.

1) Would you prefer to change arch/i386/Kconfig

config NR_CPUS
int "Maximum number of CPUs (2-255)"
range 2 255

2) The unlock sequence is not anymore inlined. It appears twice or three times
in the kernel.

3) i386 code is often taken as the base when a port is done. For example
x86_64 has the same problem.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-10-11 18:39    [W:0.098 / U:1.920 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site