Re: "movb" for spin-unlock (was Re: namei() query)

From: Jakob Østergaard (jakob@ostenfeld.dk)
Date: Sun Apr 23 2000 - 17:27:32 EST


On Sun, 23 Apr 2000, Oliver Xymoron wrote:

...
> Below is Manfred's lock test code if people with Pentium Pros want to
> bang on it. If it locks up, we have a problem. Set USE_MB to one to use
> the mov-based unlock. My dual PPro is a later stepping 9 and seems to work
> just fine. If you have an SMP system with steppings 1-8 (only 1, 2, 6, and
> 7 should be out there) and can confirm this works for you, that'd be
> great.

>From what I can see in the code, USE_MB should be set to zero for the program
to use the mov based unlock:

> #if USE_MB == 0
> "movl $1,%1\n\t" /* set current_state = 1 */
> #else
> "lock;bts $0,%1\n\t"
> #endif

Dual PPro stepping 1 here. I was just finishing my ``success report'' as the
program locked up :(

With USE_MB == 1 it won't lock up (luckily), but with !USE_MB it does.

My CPUs:

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 1
model name : Pentium Pro
stepping : 1
cpu MHz : 149.690907
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
sep_bug : yes
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
bogomips : 299.01

processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 1
model name : Pentium Pro
stepping : 1
cpu MHz : 149.690907
cache size : 256 KB
fdiv_bug : no
hlt_bug : no
sep_bug : yes
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
bogomips : 298.19

-- 
................................................................
: jakob@ostenfeld.dtu.dk  : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob Østergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:

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



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:22 EST