> > > We could use POSIX spinlocks/semaphores now but we
> > > don't because of performance, right?
> > 
> > No. As long as no one proved with test that mutexes are bad for
> > performance...
> > Funny, such test would require ~ 1 day of work.
> 
> Good question. I know the number of function calls to spinlock stuff
> is huge. Seems real semaphores may be a big win on multi-cpu boxes.

Ok, being tired of endless discussions I'll try to use mutexes instead
of spinlocks and run pgbench on my Solaris WS 10 and E4500 (4 CPU) boxes.

Vadim

Mon, 30 Jul 2001 11:17:44 -0700
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM>
RE: Performance TODO items
> > > > We could use POSIX spinlocks/semaphores now but we
> > > > don't because of performance, right?
> > > 
> > > No. As long as no one proved with test that mutexes are bad for
> > > performance...
> > > Funny, such test would require ~ 1 day of work.
> > 
> > Good question. I know the number of function calls to spinlock stuff
> > is huge. Seems real semaphores may be a big win on multi-cpu boxes.
> 
> Ok, being tired of endless discussions I'll try to use mutexes instead
> of spinlocks and run pgbench on my Solaris WS 10 and E4500 (4 CPU) boxes.

I have updated the TODO list with:

    * Improve spinlock code 
        o use SysV semaphores or queue of backends waiting on the lock
        o wakeup sleeper or sleep for less than one clock tick 
        o spin for lock on multi-cpu machines, yield on single cpu machines
        o read/write locks

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

Wed, 5 Sep 2001 20:03:26 -0400 (EDT)
Bruce Momjian <pgman@candle.pha.pa.us>
Re: Performance TODO items