Re: Any MIPS assembly experts in the house?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Any MIPS assembly experts in the house?
Дата
Msg-id 23189.1125091250@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Any MIPS assembly experts in the house?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Any MIPS assembly experts in the house?  (Stefan Kaltenbrunner <stefan@kaltenbrunner.cc>)
Список pgsql-hackers
I wrote:
> Can anyone spot the problem?  If not I fear we'll have to revert this.

After a bit of reading MIPS documentation, I found out that the proposed
patch is exactly backward: it returns 1 if it gets the lock and 0 if the
lock is already held :-(

Because callers will loop on a nonzero return, the second iteration
falls through, which is why the thing isn't an infinite loop.  Only
problem is when we hit the lock at an instant when somebody else
already has it.

Given the short duration of our spinlock holds, it was probably quite
a coincidence that Stefan's machine got a failure almost immediately.
We might have had the problem lurking for awhile.

I'll try to commit something that really works in a little bit.
        regards, tom lane


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

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: [ANNOUNCE] Welcome Core Team member Dave Page
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Call for 7.5 feature completion