Re: Microsecond sleeps with select() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Microsecond sleeps with select()
Date
Msg-id 6862.982456096@sss.pgh.pa.us
Whole thread Raw
In response to Re: Microsecond sleeps with select()  (ncm@zembu.com (Nathan Myers))
List pgsql-hackers
ncm@zembu.com (Nathan Myers) writes:
> Certainly there are machines and kernels that count time more precisely 
> (isn't PG ported to QNX?).  We do users of such kernels no favors by 
> pretending they only count clock ticks.  Furthermore, a 1ms clock
> tick is pretty common, e.g. on Alpha boxes.

Okay, I didn't know there were any popular systems that did that.

> This argues for yielding the minimum discernable amount of time (1us)
> and then backing off to a less-minimal time (1ms).

Fair enough.  As you say, it's the same result on machines with coarse
time resolution, and it should help on smarter boxes.  The main thing
is that I want to change the zero entries in s_spincycle, which
clearly aren't doing what the author intended.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Linux 2.2 vs 2.4
Next
From: Tom Lane
Date:
Subject: Re: Re: WAL and commit_delay