
> On my machine the various implemtations have the following runtimes:
> (with a modified s_lock test that does not sleep, and 
> SPINS_PER_DELAY 100000)
> 
> with LinuxPPC asm: 	1m5.16s	(Which may not work relyably on SMP)
> with cs:			1m12.25s
> with fetch_and_or:	1m26.71s

Aah, there we have it. Same test on a slower 4Way SMP:

with LinuxPPC asm: 	2m9.340s
with cs:			10m11.15s
with fetch_and_or:	3m55.19s

These numbers look more alarming.
Unfortunately the man page for fetch_and_or does not mention anything 
about using it as a locking primitive. It is documented atomic though,
so I guess that is enough.

Andreas

Tue, 15 Jan 2002 11:03:08 +0100
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>
Re: 7.1 vs. 7.2 on AIX 5L 
> > On my machine the various implemtations have the following runtimes:
> > (with a modified s_lock test that does not sleep, and 
> > SPINS_PER_DELAY 100000)
> > 
> > with LinuxPPC asm: 	1m5.16s	(Which may not work relyably on SMP)
> > with cs:			1m12.25s
> > with fetch_and_or:	1m26.71s
> 
> Aah, there we have it. Same test on a slower 4Way SMP:
> 
> with LinuxPPC asm: 	2m9.340s
> with cs:			10m11.15s
> with fetch_and_or:	3m55.19s
> 
> These numbers look more alarming.
> Unfortunately the man page for fetch_and_or does not mention anything 
> about using it as a locking primitive. It is documented atomic though,
> so I guess that is enough.
> 
> Andreas
> 

I did several times of pgbenhc -c 10 -t 20 with the modification you
suggested and once got a hung (all backends sleeping with the status
showing "COMMIT"). Also I had an eror:

NOTICE:  LockRelease: no such lock

I'm afraid now the locking is broken. Will look into more.
--
Tatsuo Ishii

Tue, 15 Jan 2002 22:11:04 +0900
Tatsuo Ishii <t-ishii@sra.co.jp>
Re: 7.1 vs. 7.2 on AIX 5L 
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
> Unfortunately the man page for fetch_and_or does not mention anything 
> about using it as a locking primitive. It is documented atomic though,
> so I guess that is enough.

You could disassemble it and see if it includes that "isync" instruction
or not.

Given Tatsuo's later report, I'm afraid the answer is "not".

			regards, tom lane

Tue, 15 Jan 2002 10:15:20 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: 7.1 vs. 7.2 on AIX 5L 