Re: Spin Lock sleep resolution
От | Claudio Freire |
---|---|
Тема | Re: Spin Lock sleep resolution |
Дата | |
Msg-id | CAGTBQpY3gspgQ3jQB-q9Ck9UicNJpC_4GN6mGEtNKX2di1WWEg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Spin Lock sleep resolution (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
On Tue, Apr 2, 2013 at 1:24 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > 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. I would guess it does matter for the cumulative error when re-sleeping several times. In any case, the resolution is limited on tick-based kernels, which are few nowadays. However, I've found evidence[0] that FreeBSD is still on that boat. [0] http://lists.freebsd.org/pipermail/freebsd-arch/2012-March/012423.html
В списке pgsql-hackers по дате отправления: