Re: Spinning verses sleeping in s_lock - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Spinning verses sleeping in s_lock
Date
Msg-id 200201222039.g0MKdjY06514@candle.pha.pa.us
Whole thread Raw
In response to Re: Spinning verses sleeping in s_lock  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: RFD: schemas and different kinds of Postgres objects
Next
From: Chris Humphries
Date:
Subject: TODO question and claim