forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbe58282
committed
Tom Lane wrote:
> > For a while I though it might be because we are using an alpha TAS in> > the spinlock rather than the old semaphore. I replaced our spinlock> > with the standard one and it made no difference. We have been running> > with our spinlock implementation for nearly 2 months on a production> > database now without a hitch, so I think it is ok. Did I ever submit> > any patches for the Alpha spinlock?>> Not that I recall. We did get some advice from some Alpha gurus at DEC> who seemed to think the existing TAS code is OK. What was it that you> felt needed to be improved?The current code uses semaphores, which has the advantage that it workswell even on multi-processor machines, but the disadvantage that it is notthe fastest way possible. Writing a spinlock on Alpha for SMP machines isvery difficult, as you need to deal with memory barriers. A real mess. Butthen one of the people at Compaq pointed out to us that there is aready-made routine on Alpha. We implemented it with the two patches below.I ran tests with lots of parallel back-ends and got around a 10% speedincrease. I include the two patches. Perhaps some of the other peoplerunning Tru64 can have a look at these as well.Cheers,Adriaan Joubert1 parente5e5de8 commitbe58282
2 files changed
+10
-3
lines changedLines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
4 |
| - | |
5 |
| - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
6 | 8 |
| |
7 | 9 |
| |
8 | 10 |
| |
|
Lines changed: 6 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
270 | 270 |
| |
271 | 271 |
| |
272 | 272 |
| |
| 273 | + | |
| 274 | + | |
273 | 275 |
| |
274 | 276 |
| |
275 | 277 |
| |
276 | 278 |
| |
| 279 | + | |
| 280 | + | |
| 281 | + | |
277 | 282 |
| |
278 | 283 |
| |
279 | 284 |
| |
|
0 commit comments
Comments
(0)