Skip site navigation (1) Skip section navigation (2)

RE: Assuming that TAS() will succeed the first time is verboten

From: "Mikheev, Vadim" <vmikheev(at)SECTORBASE(dot)COM>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: RE: Assuming that TAS() will succeed the first time is verboten
Date: 2000-12-29 18:54:00
Message-ID: 8F4C99C66D04D4118F580090272A7A234D321F@sectorbase1.sectorbase.com (view raw or flat)
Thread:
Lists: pgsql-hackers
> > The code is based on some odd assumptions.  A select() with 0 delay 
> > returns immediately unless there is an interrupt during its 
> > (very short!) time in kernel space.
> 
> Yeah, I've wondered whether the 0 entries in s_spincycle[] 
> shouldn't be 1.  The code author evidently expected select()
> to at least yield the processor even with delay 0, but the select()
> man pages I have handy say that it will "return immediately" when delay
> is 0.

I've run some tests with 5 instead of 0 and afair performance was worse,
so we should carefully test !0 values. Actually, one slocks are held
longer than anothers - probably we should use different delays...

Vadim

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2000-12-29 19:00:13
Subject: Re: [HACKERS] About PQsetClientEncoding(),"SET NAMES",and "SET CLIENT_ENCODING"
Previous:From: Michael J SchoutDate: 2000-12-29 17:29:21
Subject: Re: Upper limit on number of buffers?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group