Re: Question about LWLockAcquire's use of semaphores instead

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: bruc(at)acm(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Question about LWLockAcquire's use of semaphores instead
Date: 2002-07-30 03:38:52
Message-ID: 200207300338.g6U3cqB26396@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert E. Bruccoleri wrote:
> Dear Tom,
> Thank you for the explanation. I did not understand what was
> going on in lwlock.c.

Yes, as Tom said, using the pre-7.2 code on SMP machines, if one backend
had a spinlock, the other backend would TAS loop trying to get the lock
until its timeslice ended or the other backend released the lock. Now,
we TAS, then sleep on a semaphore and get woken up when the first
backend releases the lock. We worked hard on that logic, I can tell you
that and it was a huge discussion topic on the Fall of 2001.

> My systems are all SGI Origins having between 8 and 32
> processors, and I've been running PostgreSQL on them for about 5
> years. These machines do provide a number of good mechanisms for high
> performance shared memory parallelism that I don't think are found
> elsewhere. I wish that I had the time to understand and tune
> PostgreSQL to run really well on them.
> I have a question for you and other developers with regard to
> my SGI needs. If I made a functional Origin 2000 system available to
> you with hardware support, would the group be willing to tailor the
> SGI port for better performance?

We would have to understand how the SGI code is better than our existing
code on SMP machines.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2002-07-30 03:43:52 Re: Password sub-process ...
Previous Message Marc G. Fournier 2002-07-30 03:19:38 disk space problem ...