Re: [HACKERS] Re: [PATCHES] patches for 6.2.1p6

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: dz(at)cs(dot)unitn(dot)it (Massimo Dal Zotto)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Re: [PATCHES] patches for 6.2.1p6
Date: 1998-03-20 17:06:55
Message-ID: 199803201706.MAA07844@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I'am against a generic patch using select(). If we have sched_yield() on an
> architecture I don't see why dont't use it. Here is the patch for Linux.
> It has been tested for two months by 100 users without any problem.
> The only thing I would add is a more general configuration test in configure
> to include the proper include files.

I understand your issue. Unfortunately, only Linux has sched_yield(),
as far as I know. Perhaps we can implement sched_yield/select based on
the platform. However, if someone is holding a spinlock, does
sched_yield() give the other process enough time to finish with the
spinlock before we start checking it again. Seems select() allows us to
control the time we wait before checking again.

Also, it looks like the s_lock.h file is going to change pretty
radically from David's change, so when he is done, we can put some
OS-specific stuff if you wish.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-03-20 17:19:42 Re: [HACKERS] DEC Alpha and HAVE_INT_TIMEZONE
Previous Message Bruce Momjian 1998-03-20 17:03:31 Re: [HACKERS] expr ? trueval : falseval