forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc01c25f
committed
Improve spinlock performance for HP-UX, ia64, non-gcc.
At least on this architecture, it's very important to spin on anon-atomic instruction and only retry the atomic once it appearsthat it will succeed. To fix this, split TAS() into two macros:TAS(), for trying to grab the lock the first time, and TAS_SPIN(),for spinning until we get it. TAS_SPIN() defaults to same as TAS(),but we can override it when we know there's a better way.It's likely that some of the other cases in s_lock.h requiresimilar treatment, but this is the only one we've got conclusiveevidence for at present.1 parent6e1f1fe commitc01c25f
2 files changed
+25
-12
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
96 | 96 |
| |
97 | 97 |
| |
98 | 98 |
| |
99 |
| - | |
| 99 | + | |
100 | 100 |
| |
101 | 101 |
| |
102 | 102 |
| |
|
Lines changed: 24 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
31 | 31 |
| |
32 | 32 |
| |
33 | 33 |
| |
34 |
| - | |
35 |
| - | |
| 34 | + | |
| 35 | + | |
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 |
| - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
43 | 48 |
| |
44 |
| - | |
45 |
| - | |
46 |
| - | |
47 |
| - | |
| 49 | + | |
| 50 | + | |
48 | 51 |
| |
49 |
| - | |
50 |
| - | |
51 |
| - | |
52 |
| - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
53 | 61 |
| |
54 | 62 |
| |
55 | 63 |
| |
| |||
727 | 735 |
| |
728 | 736 |
| |
729 | 737 |
| |
| 738 | + | |
730 | 739 |
| |
731 | 740 |
| |
732 | 741 |
| |
| |||
925 | 934 |
| |
926 | 935 |
| |
927 | 936 |
| |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
928 | 941 |
| |
929 | 942 |
| |
930 | 943 |
| |
|
0 commit comments
Comments
(0)