aboutsummaryrefslogtreecommitdiff
path: root/src/backend/lib/binaryheap.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-08-29 13:48:59 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2013-08-29 14:04:37 +0300
commitb03d196be055450c7260749f17347c2d066b4254 (patch)
tree8a0619933cbe66ce22867431cf4b36af27d0d010 /src/backend/lib/binaryheap.c
parent090d0f2050647958865cb495dff74af7257d2bb4 (diff)
downloadpostgresql-b03d196be055450c7260749f17347c2d066b4254.tar.gz
postgresql-b03d196be055450c7260749f17347c2d066b4254.zip
Use a non-locking initial test in TAS_SPIN on x86_64.
Testing done in 2011 by Tom Lane concluded that this is a win on Intel Xeons and AMD Opterons, but it was not changed back then, because of an old comment in tas() that suggested that it's a huge loss on older Opterons. However, didn't have separate TAS() and TAS_SPIN() macros back then, so the comment referred to doing a non-locked initial test even on the first access, in uncontended case. I don't have access to older Opterons, but I'm pretty sure that doing an initial unlocked test is unlikely to be a loss while spinning, even though it might be for the first access. We probably should do the same on 32-bit x86, but I'm afraid of changing it without any testing. Hence just add a note to the x86 implementation suggesting that we probably should do the same there.
Diffstat (limited to 'src/backend/lib/binaryheap.c')
0 files changed, 0 insertions, 0 deletions