Re: 7.1 vs. 7.2 on AIX 5L

Поиск
Список
Период
Сортировка
От Zeugswetter Andreas SB SD
Тема Re: 7.1 vs. 7.2 on AIX 5L
Дата
Msg-id 46C15C39FEB2C44BA555E356FBCD6FA41EB4AE@m0114.s-mxs.net
обсуждение исходный текст
Ответ на 7.1 vs. 7.2 on AIX 5L  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Список pgsql-hackers
Tom wrote:
> > [ compare_and_swap man page ]
> 
> Looks kinda baroque.  What about the referenced fetch_and_or routine?
> If that's atomic it might be closer to TAS semantics.

Thanks for the hint!
Tatsuo, can you try the performance of fetch_and_or on your machine ?
Replace the cs() line in s_lock.h with the following:

<-- #define TAS(lock)       cs((int *) (lock), 0, 1)
--> #define TAS(lock)       fetch_and_or(lock, 1)

On my machine the various implemtations have the following runtimes:
(with a modified s_lock test that does not sleep, and SPINS_PER_DELAY 100000)

with LinuxPPC asm:     1m5.16s    (Which may not work relyably on SMP)
with cs:            1m12.25s
with fetch_and_or:    1m26.71s

I don't know if that is enough difference to worry about.

Andreas


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

Предыдущее
От: Hiroshi Inoue
Дата:
Сообщение: Re: FATAL 1: Relation 'pg_shadow' does not exist
Следующее
От: "Zeugswetter Andreas SB SD"
Дата:
Сообщение: Re: 7.1 vs. 7.2 on AIX 5L