Re: [HACKERS] Re: [PATCHES] patches for 6.2.1p6 - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Re: [PATCHES] patches for 6.2.1p6
Date
Msg-id 199803201706.MAA07844@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Re: [PATCHES] patches for 6.2.1p6  (Massimo Dal Zotto <dz@cs.unitn.it>)
Responses Re: [HACKERS] Re: [PATCHES] patches for 6.2.1p6
List 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@candle.pha.pa.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)

pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] expr ? trueval : falseval
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] DEC Alpha and HAVE_INT_TIMEZONE