Re: Extended Prefetching using Asynchronous IO - proposal and patch
От | Andres Freund |
---|---|
Тема | Re: Extended Prefetching using Asynchronous IO - proposal and patch |
Дата | |
Msg-id | 20140625211753.GK24114@awork2.anarazel.de обсуждение исходный текст |
Ответ на | Re: Extended Prefetching using Asynchronous IO - proposal and patch (Heikki Linnakangas <hlinnakangas@vmware.com>) |
Ответы |
Re: Extended Prefetching using Asynchronous IO - proposal
and patch
|
Список | pgsql-hackers |
On 2014-06-26 00:08:48 +0300, Heikki Linnakangas wrote: > LWLocks are implemented with semaphores, so if you can increment a semaphore > in the signal handler / callback thread, then in theory you should be able > to release a LWLock. I don't think that's a convincing argument even if semop et al were signal safe. LWLocks also use spinlocks and it's a fairly bad idea to do anything with the same spinlock both inside and outside a signal handler. I don't think we're going to get lwlock.c/LWLockRelease to work reasonably from a signal handler without a lot of work. > On Linux at least we use System V semaphores, which are (unsurpisingly) not > listed as safe for using in a signal handler. See list Async-signal-safe > functions in signal(7) man page. The function used to increment a POSIX > semaphore, sem_post(), is in the list, however. Heh, just wrote the same after reading the beginning of your email ;) Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: