Skip site navigation (1) Skip section navigation (2)

Re: Any MIPS assembly experts in the house?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Cc: Martin Pitt <martin(at)piware(dot)de>,Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
Subject: Re: Any MIPS assembly experts in the house?
Date: 2005-08-26 21:20:50
Message-ID: 23189.1125091250@sss.pgh.pa.us (view raw, whole thread or download thread mbox)
Thread:
Lists: 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

In response to

Responses

pgsql-hackers by date

Next:From: Jim C. NasbyDate: 2005-08-26 22:15:20
Subject: Re: TODO list comments
Previous:From: Greg StarkDate: 2005-08-26 21:07:58
Subject: Re: Call for 7.5 feature completion

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group