Re: AW: Re[4]: Allowing WAL fsync to be done via O_SYNC

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: AW: Re[4]: Allowing WAL fsync to be done via O_SYNC
Дата
Msg-id 27958.984779982@sss.pgh.pa.us
обсуждение исходный текст
Ответ на AW: Re[4]: Allowing WAL fsync to be done via O_SYNC  (Zeugswetter Andreas SB <ZeugswetterA@wien.spardat.at>)
Список pgsql-hackers
Zeugswetter Andreas SB  <ZeugswetterA@wien.spardat.at> writes:
>> It's great as long as you never block, but it sucks for making things
>> wait, because the wait interval will be some multiple of 10 msec rather
>> than just the time till the lock comes free.

> On the AIX platform usleep (3) is able to really sleep microseconds without 
> busying the cpu when called for more than approx. 100 us (the longer the interval,
> the less busy the cpu gets) .
> Would this not be ideal for spin_lock, or is usleep not very common ?
> Linux sais it is in the BSD 4.3 standard.

HPUX has usleep, but the man page says
    The usleep() function is included for its historical usage. The    setitimer() function is preferred over this
function.

In any case, I would expect that all these functions offer accuracy
no better than the scheduler's regular clock cycle (~ 100Hz) on most
kernels.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Martin A. Marques"
Дата:
Сообщение: Re: problems with startup script on upgrade
Следующее
От: Tom Lane
Дата:
Сообщение: Re: problems with startup script on upgrade