Re: 8.0 beta 1 on linux-mipsel R5900

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 8.0 beta 1 on linux-mipsel R5900
Дата
Msg-id 3292.1093358134@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 8.0 beta 1 on linux-mipsel R5900  ("Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>)
Ответы Re: 8.0 beta 1 on linux-mipsel R5900  (Neil Conway <neilc@samurai.com>)
Список pgsql-hackers
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
> I guess it could still save some CPU cycles in the single CPU case,
> if you yield() instead of tight loop around TAS in the failure case.
> Problem is yield and detecting single CPU is not portable.

Sure, but that's still a spinlock --- you're just tuning the backoff
behavior for local conditions.

On some architectures (Alpha at least) the TAS instruction can "fail"
even though the lock is free, if an interrupt happens to get in the way.
So I'd be inclined to loop a few times even on a single-CPU machine.

But yes, a yield primitive would be nice, and so would knowing the
number of CPUs.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [COMMITTERS] pgsql-server: Rearrange pg_subtrans handling
Следующее
От: Tom Lane
Дата:
Сообщение: Re: missing data/global