From: | Alfred Perlstein <bright(at)wintelcom(dot)net> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | 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: | 2001-01-02 08:02:31 |
Message-ID: | 20010102000230.C19572@fw.wintelcom.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
* Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> [010101 23:59] wrote:
> > Alfred Perlstein <bright(at)wintelcom(dot)net> writes:
> > > One trick that may help is calling sched_yield(2) on a lock miss,
> > > it's a POSIX call and quite new so you'd need a 'configure' test
> > > for it.
> >
> > The author of the current s_lock code seems to have thought that
> > select() with a zero delay would do the equivalent of sched_yield().
> > I'm not sure if that's true on very many kernels, if indeed any...
> >
> > I doubt we could buy much by depending on sched_yield(); if you want
> > to assume POSIX facilities, ISTM you might as well go for user-space
> > semaphores and forget the whole TAS mechanism.
>
>
> Another issue is that sched_yield brings in the pthreads library/hooks
> on some OS's, which we certainly want to avoid.
I know it's a major undertaking, but since the work is sort of done,
have you guys considered the port to solaris threads and seeing about
making a pthreads port of that?
I know it would probably get you considerable gains under Windows
at the expense of dropping some really really legacy system.
Or you could do what apache (is rumored) does and have it do either
threads or processes or both...
--
-Alfred Perlstein - [bright(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]
"I have the heart of a child; I keep it in a jar on my desk."
From | Date | Subject | |
---|---|---|---|
Next Message | Myron Scott | 2001-01-02 08:09:01 | Re: Using Threads? |
Previous Message | Oliver Elphick | 2001-01-02 07:59:26 | Re: Ignored PostgreSQL SET command |