Re: Spinlock implementation on x86_64 (was Re: Better LWLocks with compare-and-swap (9.4))

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Daniel Farina <daniel(at)heroku(dot)com>
Subject: Re: Spinlock implementation on x86_64 (was Re: Better LWLocks with compare-and-swap (9.4))
Date: 2013-08-28 17:21:01
Message-ID: 15105.1377710461@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> writes:
> So, my plan is to apply the attached non-locked-tas-spin-x86_64.patch to
> master. But I would love to get feedback from people running different
> x86_64 hardware.

Surely this patch should update the existing comment at line 209? Or at
least point out that a non-locked test in TAS_SPIN is not the same as a
non-locked test in tas() itself.

Other than the commenting, I have no objection to this. I think you're
probably right that the old tests in which this looked like a bad idea
were adding the unlocked test to tas() not only the spin case.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2013-08-28 17:24:52 Re: GetTransactionSnapshot() in enum.c
Previous Message Bruce Momjian 2013-08-28 17:08:54 Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])