Re: Spinning verses sleeping in s_lock

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: mlw <markw(at)mohawksoft(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Spinning verses sleeping in s_lock
Date: 2002-01-22 20:39:45
Message-ID: 200201222039.g0MKdjY06514@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> A final comment --- given that in 7.2 we only use spinlocks to protect
> very short segments of code, I believe it's fairly improbable for more
> than two processes to be contending for a spinlock anyway. So it's
> probably sufficient to distinguish whether we have one or more than
> one CPU, and statically select one of two spinning strategies on that
> basis. Trying to dynamically adapt for more CPUs/contending processes
> will reap only minimal returns.

Added to TODO:

* Add code to detect an SMP machine and handle spinlocks
accordingly

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

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-01-22 20:41:49 Re: RFD: schemas and different kinds of Postgres objects
Previous Message Fernando Nasser 2002-01-22 20:30:20 Re: RFD: schemas and different kinds of Postgres objects