Re: experimental: replace s_lock spinlock code with pthread_mutex on linux

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: experimental: replace s_lock spinlock code with pthread_mutex on linux
Дата
Msg-id 20120627065943.GA25028@svana.org
обсуждение исходный текст
Ответ на experimental: replace s_lock spinlock code with pthread_mutex on linux  (Nils Goroll <slink@schokola.de>)
Ответы Re: experimental: replace s_lock spinlock code with pthread_mutex on linux  (Nils Goroll <slink@schokola.de>)
Список pgsql-hackers
On Wed, Jun 27, 2012 at 12:58:47AM +0200, Nils Goroll wrote:
> So it looks like using pthread_mutexes could at least be an option on Linux.
>
> Using futexes directly could be even cheaper.

Note that below this you only have the futex(2) system call. Futexes
require all counter manipulation to happen in userspace, just like now,
so all the per architecture stuff remains.  On Linux pthread mutexes
are really just a thin wrapper on top of this.

The futex(2) system call merely provides an interface for handling the
blocking and waking of other processes and releasing locks on process
exit (so everything can still work after a kill -9).

So it's more a replacement for the SysV semaphores than anything else.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> He who writes carelessly confesses thereby at the very outset that he does
> not attach much importance to his own thoughts.  -- Arthur Schopenhauer

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

Предыдущее
От: Rushabh Lathia
Дата:
Сообщение: Server crash while trying to fetch EXPLAIN query results with a cursor
Следующее
От: Joel Jacobson
Дата:
Сообщение: Re: Schema version management