Re: Spinlocks, yet again: analysis and proposed patches

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Min Xu (Hsu)" <xu(at)cs(dot)wisc(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Spinlocks, yet again: analysis and proposed patches
Date: 2005-09-14 02:42:59
Message-ID: 28419.1126665779@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Min Xu (Hsu)" <xu(at)cs(dot)wisc(dot)edu> writes:
> ...If this were the case, perhaps first fetch the spin lock with read-only
> permission should have helped.

But the cmpb instruction in the 8.0 version of TAS would have done that,
and I think we've already established that the cmpb is a loss on most
machines (except maybe single-physical-CPU Xeons). I suggested in my
other message that it might help to grab write permission on the cache
line before actually trying to acquire the spin lock --- but I don't see
how getting read-only permission first will help.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-09-14 02:54:59 Re: Spinlocks, yet again: analysis and proposed patches
Previous Message Tom Lane 2005-09-14 02:26:58 Re: About method of PostgreSQL's Optimizer