Re: Spin Lock sleep resolution - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Spin Lock sleep resolution
Date
Msg-id 20129.1364876673@sss.pgh.pa.us
Whole thread Raw
In response to Spin Lock sleep resolution  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: Spin Lock sleep resolution
Re: Spin Lock sleep resolution
List pgsql-hackers
Jeff Janes <jeff.janes@gmail.com> writes:
> The problem is that the state is maintained only to an integer number of
> milliseconds starting at 1, so it can take a number of attempts for the
> random increment to jump from 1 to 2, and then from 2 to 3.

Hm ... fair point, if you assume that the underlying OS has a sleep
resolution finer than 1ms.  Otherwise it would not matter.

> The attached patch changes the resolution of the state variable to
> microseconds, but keeps the starting value at 1msec, i.e. 1000 usec.

No patch seen here ...
        regards, tom lane



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: [PATCH] Exorcise "zero-dimensional" arrays (Was: Re: Should array_length() Return NULL)
Next
From: Atri Sharma
Date:
Subject: Re: Page replacement algorithm in buffer cache