forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb03d196
committed
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 Xeonsand AMD Opterons, but it was not changed back then, because of an oldcomment 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 thecomment referred to doing a non-locked initial test even on the firstaccess, in uncontended case. I don't have access to older Opterons, but I'mpretty sure that doing an initial unlocked test is unlikely to be a losswhile 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 itwithout any testing. Hence just add a note to the x86 implementationsuggesting that we probably should do the same there.1 parent090d0f2 commitb03d196
1 file changed
+17
-5
lines changedLines changed: 17 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
145 | 145 |
| |
146 | 146 |
| |
147 | 147 |
| |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
148 | 154 |
| |
149 | 155 |
| |
150 | 156 |
| |
| |||
200 | 206 |
| |
201 | 207 |
| |
202 | 208 |
| |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
203 | 220 |
| |
204 | 221 |
| |
205 | 222 |
| |
206 | 223 |
| |
207 | 224 |
| |
208 |
| - | |
209 |
| - | |
210 |
| - | |
211 |
| - | |
212 |
| - | |
213 | 225 |
| |
214 | 226 |
| |
215 | 227 |
| |
|
0 commit comments
Comments
(0)